public function behaviors() { if ($this->module->adminId == 'AccessControl') { return ['access' => ['class' => \yii\filters\AccessControl::className(), 'rules' => [['allow' => true, 'roles' => ['@']]]]]; } return parent::behaviors(); }