PHP Class yii\base\ActionEvent

By setting the [[isValid]] property, one may control whether to continue running the action.
Since: 2.0
Author: Qiang Xue ([email protected])
Inheritance: extends Event
Show file Open project: yiisoft/yii2

Public Properties

Property Type Description
$action the action currently being executed
$isValid 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.
$result the action result. Event handlers may modify this property to change the action result.

Public Methods

Method Description
__construct ( Action $action, array $config = [] ) Constructor.

Method Details

__construct() public method

Constructor.
public __construct ( Action $action, array $config = [] )
$action Action the action associated with this action event.
$config array name-value pairs that will be used to initialize the object properties

Property Details

$action public property

the action currently being executed
public $action

$isValid public property

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.
public $isValid

$result public property

the action result. Event handlers may modify this property to change the action result.
public $result