base\Controller createAction()

createAction() public method

Creates an action based on the given action ID.

The method first checks if the action ID has been declared in actions(). If so, it will use the configuration declared there to create the action object. If not, it will look for a controller method whose name is in the format of actionXyz where Xyz stands for the action ID. If found, an yii\base\InlineAction representing that method will be created and returned.

public yii\base\Action createAction ( $id )
$id string

The action ID.

return yii\base\Action

The newly created action instance. Null if the ID doesn't resolve into any action.

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

Please login to continue.