Bundle/BusinessPageBundle/Listener/BusinessPageMenuListener.php
public function addGlobal(Event $event)
    {
        $this->mainItem = $this->menuBuilder->getBottomLeftNavbar()->getChild('menu.additionals');

        if ($this->menuBuilder->isGranted('ROLE_VICTOIRE_BET')) {
            $this
                ->mainItem
                ->addChild(
                    'menu.business_template',
                    [
                        'route'          => 'victoire_business_template_index',
                        'linkAttributes' => [
                            'class' => 'v-drop__anchor',
                        ],
                    ]
                )
                ->setLinkAttribute('data-toggle', 'vic-modal');
        }

        return $this->mainItem;
    }
public function addGlobal(Event $event)
    {
        $this->mainItem = $this->menuBuilder->getBottomLeftNavbar()->getChild('menu.additionals');

        if ($this->menuBuilder->isGranted('ROLE_VICTOIRE_BET')) {
            $this
                ->mainItem
                ->addChild(
                    'menu.business_template',
                    [
                        'route'          => 'victoire_business_template_index',
                        'linkAttributes' => [
                            'class' => 'v-drop__anchor',
                        ],
                    ]
                )
                ->setLinkAttribute('data-toggle', 'vic-modal');
        }

        return $this->mainItem;
    }
public function addGlobal ( Event $ event ) { $ this -> mainItem = $ this -> menuBuilder -> getBottomLeftNavbar ( ) -> getChild ( 'menu.additionals' ) ; if ( $ this -> menuBuilder -> isGranted ( 'ROLE_VICTOIRE_BET' ) ) { $ this -> mainItem -> addChild ( 'menu.business_template' , [ 'route' => 'victoire_business_template_index' , 'linkAttributes' => [ 'class' => 'v-drop__anchor' , ] , ] ) -> setLinkAttribute ( 'data-toggle' , 'vic-modal' ) ; } return $ this -> mainItem ; }
Add a global menu item.

@param Event $event

@return \Knp\Menu\ItemInterface

@SuppressWarnings checkUnusedFunctionParameters
Add a global menu item .