ActionEvent类

来源:互联网 发布:中关村软件下载中心 编辑:程序博客网 时间:2024/06/05 02:00

yii2\base\ActionEvent.php

<?php/** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yii Software LLC * @license http://www.yiiframework.com/license/ */namespace yii\base;/** * ActionEvent represents the event parameter used for an action event. * 用于操作事件的事件参数 * By setting the [[isValid]] property, one may control whether to continue running the action. * 通过设置[[isValid]]属性,控制是否继续运行action。 * @author Qiang Xue <qiang.xue@gmail.com> * @since 2.0 */class ActionEvent extends Event{    /**     * @var Action the action currently being executed     * 目前正在执行的行动     */    public $action;    /**     * @var mixed the action result. Event handlers may modify this property to change the action result.     * 操作结果 事件处理程序可以修改此属性来更改操作结果。     */    public $result;    /**     * @var boolean whether to continue running the action. Event handlers of     * [[Controller::EVENT_BEFORE_ACTION]] may set this property to decide whether     * to continue running the current action.     * 是否继续运行该动作。设置[[Controller::EVENT_BEFORE_ACTION]]属性决定是否执行当前的操作     */    public $isValid = true;    /**     * Constructor.构造函数。     * @param Action $action the action associated with this action event.与此事件相关联的动作。     * @param array $config name-value pairs that will be used to initialize the object properties     * 用来初始化对象属性的 name-value     */    public function __construct($action, $config = [])    {        $this->action = $action;        parent::__construct($config);    }}


0 0
原创粉丝点击