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.
부터: 2.0
저자: Qiang Xue (qiang.xue@gmail.com)
상속: extends Action
예제 #1
0
 /**
  * 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);
 }