/** * Returns a value indicating whether the filer is active for the given action. * @param \yii\base\Action $action the action being filtered * @return boolean whether the filer is active for the given action. */ protected function isActive($action) { if ($action->getUniqueId() === Yii::$app->getErrorHandler()->errorAction) { return false; } return parent::isActive($action); }
/** * @inheritdoc */ protected function isActive($action) { if ($this->isErrorPage($action) || $this->isLoginPage($action) || $this->isAllowedAction($action)) { return false; } return parent::isActive($action); }
/** * Returns a value indicating whether the filter is active for the given action. * @param InlineAction $action the action being filtered * @return boolean whether the filer is active for the given action. */ protected function isActive($action) { $uniqueId = $action->getUniqueId(); if ($uniqueId === Yii::$app->getErrorHandler()->errorAction) { return false; } else { if (Yii::$app->user->isGuest && Yii::$app->user->loginUrl == $uniqueId) { return false; } } return parent::isActive($action); }