public function renderMenu($name, array $options = [], $renderer = null)
    {
        if (null === $menu = $this->menuProvider->findByName($name)) {
            throw new \InvalidArgumentException(sprintf('Menu named "%s" not found.', $name));
        }

        // Tags the response as Menu relative
        $this->tagManager->addTags([
            Menu::getEntityTagPrefix(),
            sprintf('%s[id:%s]', Menu::getEntityTagPrefix(), $menu['id']),
        ]);

        return $this->menuHelper->render($name, $options, $renderer);
    }
public function renderMenu($name, array $options = [], $renderer = null)
    {
        if (null === $menu = $this->menuProvider->findByName($name)) {
            throw new \InvalidArgumentException(sprintf('Menu named "%s" not found.', $name));
        }

        // Tags the response as Menu relative
        $this->tagManager->addTags([
            Menu::getEntityTagPrefix(),
            sprintf('%s[id:%s]', Menu::getEntityTagPrefix(), $menu['id']),
        ]);

        return $this->menuHelper->render($name, $options, $renderer);
    }
public function renderMenu ( $ name , array $ options = [ ] , $ renderer = null ) { if ( null === $ menu = $ this -> menuProvider -> findByName ( $ name ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Menu named "%s" not found.' , $ name ) ) ; } // Tags the response as Menu relative $ this -> tagManager -> addTags ( [ Menu :: getEntityTagPrefix ( ) , sprintf ( '%s[id:%s]' , Menu :: getEntityTagPrefix ( ) , $ menu [ 'id' ] ) , ] ) ; return $ this -> menuHelper -> render ( $ name , $ options , $ renderer ) ; }
Renders the menu by his name.

@param string $name
@param array  $options
@param string $renderer

@throws \InvalidArgumentException

@return string
Renders the menu by his name .