继承 | yii\base\ActionEvent » yii\base\Event » yii\base\Object |
---|---|
可用自版本 | 2.0 |
ActionEvent代表事件参数用于一个动作事件。
通过设置isValid美元财产,可以控制是否继续运行。
公共属性
属性 | 类型 | 描述 | 定义在 |
---|---|---|---|
$action | yii\base\Action | 目前正在执行的行动 | yii\base\ActionEvent |
$isValid | boolean | 是否继续运行。 | yii\base\ActionEvent |
$result | mixed | 行动的结果。 | yii\base\ActionEvent |
公共方法
方法 | 描述 | 定义在 |
---|---|---|
__construct() | Constructor. | yii\base\ActionEvent |
属性详情
$action public property
目前正在执行的行动
public yii\base\Action $action = null
$isValid public property
是否继续运行。yii\base\Controller::EVENT_BEFORE_ACTION可能设置该属性决定是否继续运行当前的行动。
public boolean $isValid = true
$result public property
行动的结果。事件处理程序可以修改这个属性改变行动的结果。
public mixed $result = null
方法详情
__construct() public 方法
Constructor.
public void __construct ( $action, $config = [] ) | ||
$action | yii\base\Action | 与该操作关联的行动的事件。 |
$config | array | 名称-值对将用于初始化对象的属性 |