Bundle/MediaBundle/Helper/Menu/MenuBuilder.php
public function getChildren(MenuItem $parent = null)
    {
        if ($parent == null) {
            return $this->getTopChildren();
        }
        $result = [];
        foreach ($this->adaptors as $menuAdaptor) {
            $menuAdaptor->adaptChildren($this, $result, $parent, $this->getRequest());
        }

        return $result;
    }
public function getChildren(MenuItem $parent = null)
    {
        if ($parent == null) {
            return $this->getTopChildren();
        }
        $result = [];
        foreach ($this->adaptors as $menuAdaptor) {
            $menuAdaptor->adaptChildren($this, $result, $parent, $this->getRequest());
        }

        return $result;
    }
public function getChildren ( MenuItem $ parent = null ) { if ( $ parent == null ) { return $ this -> getTopChildren ( ) ; } $ result = [ ] ; foreach ( $ this -> adaptors as $ menuAdaptor ) { $ menuAdaptor -> adaptChildren ( $ this , $ result , $ parent , $ this -> getRequest ( ) ) ; } return $ result ; }
Get immediate children of the specified menu item.

@param MenuItem $parent

@return MenuItem[]
Get immediate children of the specified menu item .