runAction() public method
Runs an action with the specified action ID and parameters.
If the action ID is empty, the method will use $defaultAction.
See also createAction().
| public integer runAction ( $id, $params = [] ) | ||
|---|---|---|
| $id | string |
The ID of the action to be executed. |
| $params | array |
The parameters (name-value pairs) to be passed to the action. |
| return | integer |
The status of the action execution. 0 means normal, other values mean abnormal. |
| throws | yii\base\InvalidRouteException |
if the requested action ID cannot be resolved into an action successfully. |
| throws | yii\console\Exception |
if there are unknown options or missing arguments |
Please login to continue.