public function getFlatCollection(array $tree) : ObjectCollection
    {
        $data = [];

        array_walk_recursive($tree, function ($item) use (&$data)
        {
            if ($item !== NULL)
            {
                $data[] = $item;
            }
        });

        return new ObjectCollection($data);
    }
public function getFlatCollection(array $tree) : ObjectCollection
    {
        $data = [];

        array_walk_recursive($tree, function ($item) use (&$data)
        {
            if ($item !== NULL)
            {
                $data[] = $item;
            }
        });

        return new ObjectCollection($data);
    }
public function getFlatCollection ( array $ tree ) : ObjectCollection { $ data = [ ] ; array_walk_recursive ( $ tree , function ( $ item ) use ( & $ data ) { if ( $ item !== NULL ) { $ data [ ] = $ item ; } } ) ; return new ObjectCollection ( $ data ) ; }
Metoda pro transformaci multilevel pole do flat ObjectCollection
@param array $tree
@return ObjectCollection
Metoda pro transformaci multilevel pole do flat ObjectCollection