Пример #1
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['access' => ['class' => AccessControl::className(), 'rules' => [['allow' => false, 'matchCallback' => function ($rule, $action) {
         return !$this->module->getInstalled();
     }, 'denyCallback' => function ($rule, $action) {
         return $this->redirect(['install/run']);
     }], ['allow' => true]]], 'flash' => FlashBehavior::className()];
 }
Пример #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['access' => ['class' => AccessControl::className(), 'denyCallback' => function ($rule, $action) {
         return $this->redirect(['account/login']);
     }, 'rules' => [['allow' => false, 'matchCallback' => function ($rule, $action) {
         return !$this->module->getInstalled();
     }, 'denyCallback' => function ($rule, $action) {
         return $this->redirect(['install/run']);
     }], ['allow' => true, 'roles' => Config::getInstance()->get('members_visible') ? ['@', '?'] : ['@']]]], 'flash' => FlashBehavior::className()];
 }
Пример #3
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [FlashBehavior::className()];
 }