Ejemplo n.º 1
0
 /**
  * @return string
  */
 public function getModulesMenu()
 {
     $modules = Modules::find()->where("status = 1")->all();
     $paths['default'] = MenuClass::init();
     foreach ($modules as $module) {
         $class = str_replace("/", "\\", $module->path) . "\\" . 'MenuClass';
         if (class_exists($class)) {
             $paths[] = $class::init();
         }
     }
     if (!empty($paths)) {
         return $this->renderPartial('view-modules-menu', ['paths' => $paths]);
     }
 }
Ejemplo n.º 2
0
 /**
  * @return array
  */
 public function getAdminSidebarMenuItems()
 {
     $menuItems = MenuClass::adminInit();
     return $menuItems;
 }