base\Module EVENT_AFTER_ACTION

EVENT_AFTER_ACTION event of type yii\base\ActionEvent An event raised after executing a controller action.

base\Module defaultVersion()

defaultVersion() protected method (available since version 2.0.11) Returns default module version. Child class may override this method to provide more specific version detection. protected string defaultVersion ( )return string The version of this module.

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\InvalidC

base\Module createController()

createController() public method Creates a controller instance based on the given route. The route should be relative to this module. The method implements the following algorithm to resolve the given route: If the route is empty, use $defaultRoute; If the first segment of the route is a valid module ID as declared in $modules, call the module's createController() with the rest part of the route; If the first segment of the route is found in $controllerMap, create a controller based on the

base\Module beforeAction()

beforeAction() public method This method is invoked right before an action within this module is executed. The method will trigger the EVENT_BEFORE_ACTION event. The return value of the method will determine whether the action should continue to run. In case the action should not run, the request should be handled inside of the beforeAction code by either providing the necessary output or redirecting the request. Otherwise the response will be empty. If you override this method, your code s

base\Module afterAction()

afterAction() public method This method is invoked right after an action within this module is executed. The method will trigger the EVENT_AFTER_ACTION event. The return value of the method will be used as the action return value. If you override this method, your code should look like the following: public function afterAction($action, $result) { $result = parent::afterAction($action, $result); // your custom code here return $result; } public mixed afterAction ( $action, $r

base\Module $viewPath

$viewPath public property The root directory of view files. Defaults to "$basePath/views". public string getViewPath ( )public void setViewPath ( $path )

base\Module $version

$version public property The version of this module. public string getVersion ( )public void setVersion ( $version )

base\Module $uniqueId

$uniqueId public read-only property The unique ID of the module. public string getUniqueId ( )

base\Module $params

$params public property Custom module parameters (name => value). public array $params = []