/**
  * @param Plugin $plugin
  */
 private function createMenuItem(Plugin $plugin)
 {
     $parentMenuItem = $this->findMenuItemByLabel(self::PARENT_MENU_LABEL_FOR_CURRENT_MENU);
     $menu = new Menu();
     $menu->setPlugin($plugin);
     $menu->setLabel(self::CURRENT_MENU_LABEL);
     $menu->setController(self::SWAG_IMPORT_EXPORT_CONTROLLER);
     $menu->setAction(self::SWAG_IMPORT_EXPORT_ACTION);
     $menu->setClass(self::CURRENT_MENU_ITEM_CLASS);
     $menu->setParent($parentMenuItem);
     $menu->setActive(true);
     $menu->setPosition(3);
     $this->modelManager->persist($menu);
     $this->modelManager->flush();
 }
 /**
  * @inheritdoc
  */
 public function install()
 {
     $parentMenuItem = $this->findParent();
     $plugin = $this->findPlugin();
     $menuItem = new Menu();
     $menuItem->setLabel(self::MENU_LABEL);
     $menuItem->setController(self::PLUGIN_NAME);
     $menuItem->setAction('Index');
     $menuItem->setClass(self::MENU_ITEM_CLASS);
     $menuItem->setActive(1);
     $menuItem->setParent($parentMenuItem);
     $menuItem->setPlugin($plugin);
     $menuItem->setPosition(6);
     $this->modelManager->persist($menuItem);
     $this->modelManager->flush();
 }