/** * Removes 'Web Setup Wizard' from the menu if doc root is pub and no setup url variable is specified. * * @param Builder $subject * @param Menu $menu * @return Menu * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetResult(Builder $subject, Menu $menu) { if ($this->docRootLocator->isPub()) { $menu->remove('Magento_Backend::setup_wizard'); } return $menu; }
/** * Removes 'Search Synonyms' from the menu if 'synonyms' is not supported * * @param Builder $subject * @param Menu $menu * @return Menu * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function afterGetResult(Builder $subject, Menu $menu) { $searchEngine = $this->engineResolver->getCurrentSearchEngine(); if (!$this->searchFeatureConfig->isFeatureSupported(ConfigInterface::SEARCH_ENGINE_FEATURE_SYNONYMS, $searchEngine)) { // "Search Synonyms" feature is not supported by the current configured search engine. // Menu will be updated to remove it from the list $menu->remove(self::SEARCH_SYNONYMS_MENU_ITEM_ID); } return $menu; }
public function testRemoveDoLogRemoveAction() { $this->_model->add($this->_items['item1']); $this->_model->remove('item1'); }
public function testRemoveDoLogRemoveAction() { $this->_model->add($this->_items['item1']); $this->_logger->expects($this->once())->method('log')->with($this->equalTo(sprintf('Remove on item with id %s was processed', $this->_items['item1']->getId()))); $this->_model->remove('item1'); }