base\Module createControllerByID()

createControllerByID() public method

Creates a controller based on the given controller ID.

The controller ID is relative to this module. The controller class should be namespaced under $controllerNamespace.

Note that this method does not check $modules or $controllerMap.

public yii\base\Controller createControllerByID ( $id )
$id string

The controller ID.

return yii\base\Controller

The newly created controller instance, or null if the controller ID is invalid.

throws yii\base\InvalidConfigException

if the controller class and its file name do not match. This exception is only thrown when in debug mode.

doc_Yii
2016-10-30 16:52:03
Comments
Leave a Comment

Please login to continue.