public function getTree(ObjectCollection $objectCollection, int $left = 0, int $right = NULL) : array
    {
        $items = [];

        foreach ($objectCollection as $item)
        {
            $items[] = $item;
        }

        $tree =  $this->generateTree($items, $left, $right);

        return $tree;
    }
public function getTree(ObjectCollection $objectCollection, int $left = 0, int $right = NULL) : array
    {
        $items = [];

        foreach ($objectCollection as $item)
        {
            $items[] = $item;
        }

        $tree =  $this->generateTree($items, $left, $right);

        return $tree;
    }
public function getTree ( ObjectCollection $ objectCollection , int $ left = 0 , int $ right = NULL ) : array { $ items = [ ] ; foreach ( $ objectCollection as $ item ) { $ items [ ] = $ item ; } $ tree = $ this -> generateTree ( $ items , $ left , $ right ) ; return $ tree ; }
Metoda pro transformaci nested tree do multilevel pole
@param ObjectCollection $objectCollection
@param int $left
@param int|NULL $right
@return array
Metoda pro transformaci nested tree do multilevel pole