The name of the controller method is available via [[actionMethod]] which is set by the [[controller]] who creates this action. For more details and usage information on InlineAction, see the guide article on actions.
Since: 2.0
Author: Qiang Xue (qiang.xue@gmail.com)
Inheritance: extends Action
コード例 #1
0
ファイル: AccessControl.php プロジェクト: reuhtte/yii2-admin
 /**
  * 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);
 }