/**
  * @param ConfigureMenuEvent $event
  */
 public function onMenuConfigure(ConfigureMenuEvent $event)
 {
     $menu = $event->getMenu();
     if ($menu->getName() !== self::MENU) {
         return;
     }
     if ($this->authorizationChecker->isGranted(self::ROLE_ADMIN)) {
         if (!($menuAdmin = $menu->getChild(self::MENU_ADMIN))) {
             $menuAdmin = $menu->addChild(self::MENU_ADMIN);
         }
         $menuAdmin->addChild('Connectors', ['route' => 'integrated_channel_config_index']);
     }
 }
 /**
  * @param ConfigureMenuEvent $event
  */
 public function onMenuConfigure(ConfigureMenuEvent $event)
 {
     $menu = $event->getMenu();
     if ($menu->getName() !== self::MENU) {
         return;
     }
     if ($this->authorizationChecker->isGranted([self::ROLE_ADMIN, self::ROLE_EXPORT])) {
         if (!($menuContent = $menu->getChild(self::MENU_CONTENT))) {
             $menuContent = $menu->addChild(self::MENU_CONTENT);
         }
         $menuContent->addChild('Export', array('route' => 'integrated_export_homepage'));
     }
 }
 /**
  * @param ConfigureMenuEvent $event
  */
 public function onMenuConfigure(ConfigureMenuEvent $event)
 {
     $menu = $event->getMenu();
     if ($menu->getName() !== self::MENU) {
         return;
     }
     if ($this->authorizationChecker->isGranted(self::ROLE_ADMIN)) {
         if (!($menuWebsite = $menu->getChild(self::MENU_WEBSITE))) {
             $menuWebsite = $menu->addChild(self::MENU_WEBSITE);
         }
         $menuWebsite->addChild('Pages', array('route' => 'integrated_page_page_index'));
     }
 }
 /**
  * Test getMenu function
  */
 public function testGetMenuFunction()
 {
     $this->assertSame($this->menu, $this->event->getMenu());
 }