Example #1
0
 /**
  * @inheritdoc
  */
 public function beforeAction($action)
 {
     /**
      * Check if it's already installed - if not force controller module
      */
     if (!$this->params['installed'] && $this->controller->module != null && $this->controller->module->id != 'installer') {
         $this->controller->redirect(['/installer/index']);
         return false;
     }
     /**
      * More random widget autoId prefix
      * Ensures to be unique also on ajax partials
      */
     \yii\base\Widget::$autoIdPrefix = 'h' . mt_rand(1, 999999) . 'w';
     return parent::beforeAction($action);
 }