80 \
Magento\Backend\Model\MenuFactory $menuFactory,
83 \
Magento\Framework\Event\ManagerInterface $eventManager,
84 \Psr\Log\LoggerInterface
$logger,
88 $this->_menuBuilder = $menuBuilder;
89 $this->_director = $menuDirector;
90 $this->_configCacheType = $configCacheType;
91 $this->_eventManager = $eventManager;
93 $this->_menuFactory = $menuFactory;
94 $this->_configReader = $configReader;
95 $this->_scopeConfig = $scopeConfig;
96 $this->_appState = $appState;
113 }
catch (\InvalidArgumentException $e) {
114 $this->_logger->critical($e);
116 }
catch (\BadMethodCallException $e) {
117 $this->_logger->critical($e);
119 }
catch (\OutOfRangeException $e) {
120 $this->_logger->critical($e);
122 }
catch (\Exception $e) {
135 $this->_menu = $this->_menuFactory->create();
137 $cache = $this->_configCacheType->load(self::CACHE_MENU_OBJECT);
139 $this->_menu->unserialize(
$cache);
143 $this->_director->direct(
144 $this->_configReader->read($this->_appState->getAreaCode()),
148 $this->_menu = $this->_menuBuilder->getResult($this->_menu);