src/Kunstmaan/AdminBundle/Helper/Menu/MenuBuilder.php
public function getChildren(MenuItem $parent = null)
    {
        if ($parent === null) {
            return $this->getTopChildren();
        }
        /* @var $request Request */
        $request = $this->container->get('request_stack')->getCurrentRequest();
        $result = array();
        foreach ($this->getAdaptors() as $menuAdaptor) {
            $menuAdaptor->adaptChildren($this, $result, $parent, $request);
        }

        return $result;
    }
public function getChildren(MenuItem $parent = null)
    {
        if ($parent === null) {
            return $this->getTopChildren();
        }
        /* @var $request Request */
        $request = $this->container->get('request_stack')->getCurrentRequest();
        $result = array();
        foreach ($this->getAdaptors() as $menuAdaptor) {
            $menuAdaptor->adaptChildren($this, $result, $parent, $request);
        }

        return $result;
    }
public function getChildren ( MenuItem $ parent = null ) { if ( $ parent === null ) { return $ this -> getTopChildren ( ) ; } /* @var $request Request */ $ request = $ this -> container -> get ( 'request_stack' ) -> getCurrentRequest ( ) ; $ result = array ( ) ; foreach ( $ this -> getAdaptors ( ) as $ menuAdaptor ) { $ menuAdaptor -> adaptChildren ( $ this , $ result , $ parent , $ request ) ; } return $ result ; }
Get immediate children of the specified menu item

@param MenuItem $parent

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