src/Zicht/Bundle/MenuBundle/Menu/Builder.php
public function getRootItemByName($name, $request)
    {
        $menus = $this->loadRoots($request);

        if (!isset($menus[$name])) {
            return null;
        }

        return $this->menuItemEntity->find($menus[$name][0]);
    }
public function getRootItemByName($name, $request)
    {
        $menus = $this->loadRoots($request);

        if (!isset($menus[$name])) {
            return null;
        }

        return $this->menuItemEntity->find($menus[$name][0]);
    }
public function getRootItemByName ( $ name , $ request ) { $ menus = $ this -> loadRoots ( $ request ) ; if ( ! isset ( $ menus [ $ name ] ) ) { return null ; } return $ this -> menuItemEntity -> find ( $ menus [ $ name ] [ 0 ] ) ; }
Get the root item based on the specified name and request.

@param string $name
@param Request $request
@return mixed
Get the root item based on the specified name and request .