Пример #1
0
 /**
  * Initialize menu object
  *
  * @return void
  */
 protected function _initMenu()
 {
     if (!$this->_menu) {
         $this->_menu = $this->_menuFactory->create();
         $cache = $this->_configCacheType->load(self::CACHE_MENU_OBJECT);
         if ($cache) {
             $this->_menu->unserialize($cache);
             return;
         }
         $this->_director->direct($this->_configReader->read($this->_appState->getAreaCode()), $this->_menuBuilder, $this->_logger);
         $this->_menu = $this->_menuBuilder->getResult($this->_menu);
         $this->_configCacheType->save($this->_menu->serialize(), self::CACHE_MENU_OBJECT);
     }
 }
Пример #2
0
 public function testValidateMenuFiles()
 {
     $this->_model->read('adminhtml');
 }