base\Module hasModule()

hasModule() public method Checks whether the child module of the specified ID exists. This method supports checking the existence of both child and grand child modules. public boolean hasModule ( $id )$id string Module ID. For grand child modules, use ID path relative to this module (e.g. admin/content). return boolean Whether the named module exists. Both loaded and unloaded modules are considered.

base\Module init()

init() public method Initializes the module. This method is called after the module is created and initialized with property values given in configuration. The default implementation will initialize $controllerNamespace if it is not set. If you override this method, please make sure you call the parent implementation. public void init ( )

base\Module getViewPath()

getViewPath() public method Returns the directory that contains the view files for this module. public string getViewPath ( )return string The root directory of view files. Defaults to "$basePath/views".

base\Module getLayoutPath()

getLayoutPath() public method Returns the directory that contains layout view files for this module. public string getLayoutPath ( )return string The root directory of layout files. Defaults to "$viewPath/layouts".

base\Module getModule()

getModule() public method Retrieves the child module of the specified ID. This method supports retrieving both child modules and grand child modules. See also hasModule(). public yii\base\Module|null getModule ( $id, $load = true )$id string Module ID (case-sensitive). To retrieve grand child modules, use ID path relative to this module (e.g. admin/content). $load boolean Whether to load the module if it is not yet loaded. return yii\base\Module|null The module instance, null if th

base\Module getModules()

getModules() public method Returns the sub-modules in this module. public array getModules ( $loadedOnly = false )$loadedOnly boolean Whether to return the loaded sub-modules only. If this is set false, then all sub-modules registered in this module will be returned, whether they are loaded or not. Loaded modules will be returned as objects, while unloaded modules as configuration arrays. return array The modules (indexed by their IDs).

base\Module EVENT_BEFORE_ACTION

EVENT_BEFORE_ACTION event of type yii\base\ActionEvent An event raised before executing a controller action. You may set yii\base\ActionEvent::$isValid to be false to cancel the action execution.

base\Module getInstance()

getInstance() public static method Returns the currently requested instance of this module class. If the module class is not currently requested, null will be returned. This method is provided so that you access the module instance from anywhere within the module. public static static|null getInstance ( )return static|null The currently requested instance of this module class, or null if the module class is not requested.

base\Module getControllerPath()

getControllerPath() public method Returns the directory that contains the controller classes according to $controllerNamespace. Note that in order for this method to return a value, you must define an alias for the root namespace of $controllerNamespace. public string getControllerPath ( )return string The directory that contains the controller classes. throws yii\base\InvalidParamException if there is no alias defined for the root namespace of $controllerNamespace.

base\Module getBasePath()

getBasePath() public method Returns the root directory of the module. It defaults to the directory containing the module class file. public string getBasePath ( )return string The root directory of the module.