public function addLogoutItem(MenuCollectionEvent $event): void
    {
        $menu = $event->getMenu();

        $separator = $this->factory->createItem('separator', [
            'extras' => [
                'separator' => true,
                'translation_domain' => false,
            ],
        ]);
        $menu->addChild($separator);

        // Create logout menu item.
        $logout = $this->factory->createItem('menu_item.logout', [
            'route' => 'fos_user_security_logout',
            'extras' => [
                'icon' => 'sign-out',
                'translation_domain' => BkstgCoreBundle::TRANSLATION_DOMAIN,
            ],
        ]);
        $menu->addChild($logout);
    }
public function addLogoutItem(MenuCollectionEvent $event): void
    {
        $menu = $event->getMenu();

        $separator = $this->factory->createItem('separator', [
            'extras' => [
                'separator' => true,
                'translation_domain' => false,
            ],
        ]);
        $menu->addChild($separator);

        // Create logout menu item.
        $logout = $this->factory->createItem('menu_item.logout', [
            'route' => 'fos_user_security_logout',
            'extras' => [
                'icon' => 'sign-out',
                'translation_domain' => BkstgCoreBundle::TRANSLATION_DOMAIN,
            ],
        ]);
        $menu->addChild($logout);
    }
public function addLogoutItem ( MenuCollectionEvent $ event ) : void { $ menu = $ event -> getMenu ( ) ; $ separator = $ this -> factory -> createItem ( 'separator' , [ 'extras' => [ 'separator' => true , 'translation_domain' => false , ] , ] ) ; $ menu -> addChild ( $ separator ) ; // Create logout menu item. $ logout = $ this -> factory -> createItem ( 'menu_item.logout' , [ 'route' => 'fos_user_security_logout' , 'extras' => [ 'icon' => 'sign-out' , 'translation_domain' => BkstgCoreBundle :: TRANSLATION_DOMAIN , ] , ] ) ; $ menu -> addChild ( $ logout ) ; }
Create the logout menu item.

@param MenuCollectionEvent $event The menu collection event.

@return void
Create the logout menu item .