/** * @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()]; }
/** * @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()]; }
/** * @inheritdoc */ public function behaviors() { return [FlashBehavior::className()]; }