base\Controller runAction()

runAction() public method

Runs an action within this controller with the specified action ID and parameters.

If the action ID is empty, the method will use $defaultAction.

See also createAction().

public mixed 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 mixed

The result of the action.

throws yii\base\InvalidRouteException

if the requested action ID cannot be resolved into an action successfully.

doc_Yii
2016-10-30 16:51:28
Comments
Leave a Comment

Please login to continue.