runAction() public method
Runs a controller action specified by a route.
This method parses the specified route and creates the corresponding child module(s), controller and action instances. It then calls yii\base\Controller::runAction() to run the action with the given parameters. If the route is empty, the method will use $defaultRoute.
public mixed runAction ( $route, $params = [] ) | ||
---|---|---|
$route | string |
The route that specifies the action. |
$params | array |
The parameters to be passed to the action |
return | mixed |
The result of the action. |
throws | yii\base\InvalidRouteException |
if the requested route cannot be resolved into an action successfully. |
Please login to continue.