public function addSettingsItem(ProductionMenuCollectionEvent $event): void
    {
        $menu = $event->getMenu();
        $group = $event->getGroup();

        // Should only be available to admins.
        if (!$this->auth->isGranted('GROUP_ROLE_ADMIN', $group)) {
            return;
        }

        // Create settings menu items.
        $settings = $this->factory->createItem('menu_item.settings', [
            'route' => 'bkstg_production_settings',
            'routeParameters' => ['production_slug' => $group->getSlug()],
            'extras' => [
                'icon' => 'wrench',
                'translation_domain' => BkstgCoreBundle::TRANSLATION_DOMAIN,
            ],
        ]);
        $menu->addChild($settings);

        $general = $this->factory->createItem('menu_item.general', [
            'route' => 'bkstg_production_settings',
            'routeParameters' => ['production_slug' => $group->getSlug()],
            'extras' => [
                'translation_domain' => BkstgCoreBundle::TRANSLATION_DOMAIN,
            ],
        ]);
        $settings->addChild($general);
    }
public function addSettingsItem(ProductionMenuCollectionEvent $event): void
    {
        $menu = $event->getMenu();
        $group = $event->getGroup();

        // Should only be available to admins.
        if (!$this->auth->isGranted('GROUP_ROLE_ADMIN', $group)) {
            return;
        }

        // Create settings menu items.
        $settings = $this->factory->createItem('menu_item.settings', [
            'route' => 'bkstg_production_settings',
            'routeParameters' => ['production_slug' => $group->getSlug()],
            'extras' => [
                'icon' => 'wrench',
                'translation_domain' => BkstgCoreBundle::TRANSLATION_DOMAIN,
            ],
        ]);
        $menu->addChild($settings);

        $general = $this->factory->createItem('menu_item.general', [
            'route' => 'bkstg_production_settings',
            'routeParameters' => ['production_slug' => $group->getSlug()],
            'extras' => [
                'translation_domain' => BkstgCoreBundle::TRANSLATION_DOMAIN,
            ],
        ]);
        $settings->addChild($general);
    }
public function addSettingsItem ( ProductionMenuCollectionEvent $ event ) : void { $ menu = $ event -> getMenu ( ) ; $ group = $ event -> getGroup ( ) ; // Should only be available to admins. if ( ! $ this -> auth -> isGranted ( 'GROUP_ROLE_ADMIN' , $ group ) ) { return ; } // Create settings menu items. $ settings = $ this -> factory -> createItem ( 'menu_item.settings' , [ 'route' => 'bkstg_production_settings' , 'routeParameters' => [ 'production_slug' => $ group -> getSlug ( ) ] , 'extras' => [ 'icon' => 'wrench' , 'translation_domain' => BkstgCoreBundle :: TRANSLATION_DOMAIN , ] , ] ) ; $ menu -> addChild ( $ settings ) ; $ general = $ this -> factory -> createItem ( 'menu_item.general' , [ 'route' => 'bkstg_production_settings' , 'routeParameters' => [ 'production_slug' => $ group -> getSlug ( ) ] , 'extras' => [ 'translation_domain' => BkstgCoreBundle :: TRANSLATION_DOMAIN , ] , ] ) ; $ settings -> addChild ( $ general ) ; }
Add the settings menu item.

@param ProductionMenuCollectionEvent $event The menu collection event.

@return void
Add the settings menu item .