Bundle/TemplateBundle/Listener/TemplateMenuListener.php
public function addGlobal(Event $event)
    {
        $menuTemplate = $this->menuBuilder->getBottomRightNavbar()->getChild('menu.template');

        $menuTemplate->addChild('menu.template.new', [
            'route'          => 'victoire_template_new',
            'linkAttributes' => [
                'class' => 'v-drop__anchor',
            ],
        ])->setLinkAttribute('data-toggle', 'vic-modal');

        $menuTemplate->addChild('menu.template.index', [
            'route'          => 'victoire_template_index',
            'linkAttributes' => [
                'class' => 'v-drop__anchor',
            ],
        ])->setLinkAttribute('data-toggle', 'vic-modal');
    }
public function addGlobal(Event $event)
    {
        $menuTemplate = $this->menuBuilder->getBottomRightNavbar()->getChild('menu.template');

        $menuTemplate->addChild('menu.template.new', [
            'route'          => 'victoire_template_new',
            'linkAttributes' => [
                'class' => 'v-drop__anchor',
            ],
        ])->setLinkAttribute('data-toggle', 'vic-modal');

        $menuTemplate->addChild('menu.template.index', [
            'route'          => 'victoire_template_index',
            'linkAttributes' => [
                'class' => 'v-drop__anchor',
            ],
        ])->setLinkAttribute('data-toggle', 'vic-modal');
    }
public function addGlobal ( Event $ event ) { $ menuTemplate = $ this -> menuBuilder -> getBottomRightNavbar ( ) -> getChild ( 'menu.template' ) ; $ menuTemplate -> addChild ( 'menu.template.new' , [ 'route' => 'victoire_template_new' , 'linkAttributes' => [ 'class' => 'v-drop__anchor' , ] , ] ) -> setLinkAttribute ( 'data-toggle' , 'vic-modal' ) ; $ menuTemplate -> addChild ( 'menu.template.index' , [ 'route' => 'victoire_template_index' , 'linkAttributes' => [ 'class' => 'v-drop__anchor' , ] , ] ) -> setLinkAttribute ( 'data-toggle' , 'vic-modal' ) ; }
add a global menu item.

@param Event $event

@return \Knp\Menu\ItemInterface <\Knp\Menu\ItemInterface, NULL>
add a global menu item .