Пример #1
0
 /**
  * Register core modules as app module
  */
 public function registerAppModules()
 {
     if (Yii::$app->hasModule('mmanager')) {
         /** @var \yujin1st\core\modules\mmanager\Module $manager */
         $manager = Yii::$app->getModule('mmanager');
         $manager->registerModules($this->appModules);
     } else {
         Manager::registerModules($this->appModules, ['webEnd' => $this->webEnd]);
     }
 }
Пример #2
0
 /**
  * Register installed and predefined modules
  *
  * @param array $predefinedModules
  */
 public function registerModules($predefinedModules)
 {
     $modules = $predefinedModules;
     Manager::registerModules($modules, ['webEnd' => $this->webEnd]);
 }