/** * Get menu by menu name * @param string $menu_name - menu name * @return string */ private function getMenu($menu_name) { $menu_name = self::$DEV_MODE ? self::$MENU_NAME : $menu_name; $menu = AdminMenuBuilder::getMenu($menu_name, self::$MENU_TYPE); $modules = self::$DEV_MODE ? array() : $this->getModules(); if ($menu) { $tpl = self::$DEV_MODE ? 'dev_menu' : 'menu'; return CMSFactory\assetManager::create()->setData(array('menu' => $menu, 'modules' => $modules, 'SAAS' => self::$SAAS))->registerScript('admin_menu')->fetchAdminTemplate($tpl); } }