Esempio n. 1
0
 /**
  * Apply change.
  *
  * @param MenuInterface $menu  Menu
  * @param string        $stage Stage
  *
  * @return $this Self object
  */
 public function applyChange(MenuInterface $menu, $stage)
 {
     $menuBuilders = $this->getElementsByMenuCodeAndStage($menu->getCode(), $stage);
     /**
      * @var MenuBuilderInterface $menuBuilder
      */
     foreach ($menuBuilders as $menuBuilder) {
         $menuBuilder->build($menu);
     }
     return $this;
 }
Esempio n. 2
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->findSubnodeByName('admin.settings.plural')->addSubnode($this->menuNodeFactory->create()->setName('admin.currency.plural')->setUrl('admin_currency_list')->setPriority(3));
 }
Esempio n. 3
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->addSubnode($this->menuNodeFactory->create()->setName('admin.order.plural')->setCode('shopping-cart')->setUrl('admin_order_list')->setTag('order')->setPriority(16)->setActiveUrls(['admin_order_edit', 'admin_customer_order_list', 'admin_customer_order_list']));
 }
Esempio n. 4
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->addSubnode($this->menuNodeFactory->create()->setName('admin.product.plural')->setCode('barcode')->setUrl('admin_product_list')->setTag('catalog')->setPriority(35)->setActiveUrls(['admin_product_edit', 'admin_product_new']))->addSubnode($this->menuNodeFactory->create()->setName('admin.purchasable_pack.plural')->setCode('archive')->setUrl('admin_purchasable_pack_list')->setTag('catalog')->setPriority(33)->setActiveUrls(['admin_purchasable_pack_edit', 'admin_purchasable_pack_new']))->addSubnode($this->menuNodeFactory->create()->setName('admin.categorization.single')->setCode('tag')->setTag('catalog')->setPriority(30)->addSubnode($this->menuNodeFactory->create()->setName('admin.attribute.plural')->setUrl('admin_attribute_list')->setActiveUrls(['admin_attribute_edit', 'admin_attribute_new']))->addSubnode($this->menuNodeFactory->create()->setName('admin.manufacturer.plural')->setUrl('admin_manufacturer_list')->setActiveUrls(['admin_manufacturer_edit', 'admin_manufacturer_new']))->addSubnode($this->menuNodeFactory->create()->setName('admin.category.plural')->setUrl('admin_category_list')->setActiveUrls(['admin_category_edit', 'admin_category_new'])));
 }
Esempio n. 5
0
 /**
  * Apply change.
  *
  * @param MenuInterface $menu  Menu
  * @param string        $stage Stage
  *
  * @return $this Self object
  */
 public function applyChange(MenuInterface $menu, $stage)
 {
     $menu->setSubnodes($this->applyFiltersToMenuNodes($menu->getSubnodes(), $menu->getCode(), $stage));
     return $this;
 }
Esempio n. 6
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->addSubnode($this->menuNodeFactory->create()->setName('admin.coupon.plural')->setCode('gift')->setUrl('admin_coupon_list')->setTag('catalog')->setPriority(32)->setActiveUrls(['admin_coupon_edit', 'admin_coupon_new']));
 }
Esempio n. 7
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->findSubnodeByName('plugin_type.shipping')->addSubnode($this->menuNodeFactory->create()->setName('admin.menu.custom_shipping')->setUrl('admin_carrier_list')->setActiveUrls(['admin_carrier_edit', 'admin_carrier_new', 'admin_shipping_range_edit', 'admin_shipping_range_new']));
 }
Esempio n. 8
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->findSubnodeByName('admin.menu.design')->addSubnode($this->menuNodeFactory->create()->setName('admin.template.plural')->setUrl('admin_template_list')->setPriority(1));
 }
Esempio n. 9
0
 /**
  * Save menu configuration to memory.
  *
  * @param MenuInterface $menu Menu loaded and processed
  *
  * @return $this Self object
  */
 private function saveToMemory(MenuInterface $menu)
 {
     $this->menus[$menu->getCode()] = $menu;
     return $this;
 }
Esempio n. 10
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->addSubnode($this->menuNodeFactory->create()->setName('plugin_type.payment')->setTag('settings')->setCode('credit-card')->setPriority(31));
 }
Esempio n. 11
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->addSubnode($this->menuNodeFactory->create()->setName('plugin_type.shipping')->setTag('settings')->setCode('truck')->setPriority(30));
 }
Esempio n. 12
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->findSubnodeByName('admin.order.plural')->setWarnings($this->getNonShippedOrdersCount());
 }
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->addSubnode($this->menuNodeFactory->create()->setName('plugin_type.utility')->setTag('settings')->setPriority(31)->addSubnode($this->menuNodeFactory->create()->setName('elcodi_plugin.clear_cache.name')->setUrl('admin_clear_cache_index')->setActiveUrls(['admin_clear_cache_index'])));
 }
Esempio n. 14
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->findSubnodeByName('plugin_type.social')->addSubnode($this->menuNodeFactory->create()->setName('admin.plugin.social_store')->setUrl(['admin_plugin_categorized_list', ['category' => 'social']])->setPriority(9999));
     $menu->findSubnodeByName('plugin_type.payment')->addSubnode($this->menuNodeFactory->create()->setName('admin.plugin.payment_store')->setUrl(['admin_plugin_categorized_list', ['category' => 'payment']])->setPriority(9999));
     $menu->findSubnodeByName('plugin_type.shipping')->addSubnode($this->menuNodeFactory->create()->setName('admin.plugin.shipping_store')->setUrl(['admin_plugin_categorized_list', ['category' => 'shipping']])->setPriority(9999));
 }
Esempio n. 15
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->addSubnode($this->menuNodeFactory->create()->setName('admin.plugin.plural')->setCode('puzzle-piece')->setUrl('admin_plugin_list')->setPriority(-30)->setTag('settings')->setActiveUrls(['admin_plugin_configure'])->addSubnode($this->menuNodeFactory->create()->setName('admin.plugin.app_store')->setUrl('admin_plugin_list')->setPriority(9999)))->addSubnode($this->menuNodeFactory->create()->setName('plugin_type.social')->setCode('share-alt')->setTag('settings')->setPriority(32));
 }
Esempio n. 16
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->addSubnode($this->menuNodeFactory->create()->setName('admin.dashboard.single')->setCode('dashboard')->setUrl('admin_homepage')->setTag('dashboard')->setActiveUrls(['admin_reports_today', 'admin_reports_yesterday', 'admin_reports_last_week', 'admin_reports_last_month', 'admin_reports_last_quarter']))->addSubnode($this->menuNodeFactory->create()->setName('admin.communication.single')->setCode('bullhorn')->setTag('communication'))->addSubnode($this->menuNodeFactory->create()->setName('admin.menu.design')->setCode('adjust')->setTag('design'))->addSubnode($this->menuNodeFactory->create()->setName('admin.settings.plural')->setCode('gear')->setTag('settings')->setPriority(-32));
 }
Esempio n. 17
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $visiblePlugins = $this->filterVisiblePlugins();
     $this->buildByPluginCategory($menu->findSubnodeByName('plugin_type.payment'), $visiblePlugins, 'payment')->buildByPluginCategory($menu->findSubnodeByName('plugin_type.shipping'), $visiblePlugins, 'shipping')->buildByPluginCategory($menu->findSubnodeByName('plugin_type.social'), $visiblePlugins, 'social');
 }
Esempio n. 18
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->findSubnodeByName('admin.settings.plural')->addSubnode($this->menuNodeFactory->create()->setName('admin.settings.section.address.title')->setUrl('admin_store_address')->setPriority(2))->addSubnode($this->menuNodeFactory->create()->setName('admin.settings.section.store.title')->setUrl('admin_store_settings')->setPriority(2));
     $menu->findSubnodeByName('admin.menu.design')->addSubnode($this->menuNodeFactory->create()->setName('admin.settings.section.corporate.title')->setUrl('admin_store_corporate')->setPriority(2)->setTag('design'));
 }
Esempio n. 19
0
 /**
  * Build the menu
  *
  * @param MenuInterface $menu Menu
  */
 public function build(MenuInterface $menu)
 {
     $menu->findSubnodeByName('admin.communication.single')->addSubnode($this->menuNodeFactory->create()->setName('admin.page.plural')->setCode('file-text-o')->setUrl('admin_page_list')->setActiveUrls(['admin_page_edit', 'admin_page_new']))->addSubnode($this->menuNodeFactory->create()->setName('admin.blog.single')->setCode('pencil')->setUrl('admin_blog_post_list')->setActiveUrls(['admin_blog_post_edit', 'admin_blog_post_new']))->addSubnode($this->menuNodeFactory->create()->setName('admin.mailing.plural')->setCode('envelope-o')->setUrl('admin_email_list')->setActiveUrls(['admin_email_list', 'admin_email_edit']));
 }