base\Controller getView()

getView() public method Returns the view object that can be used to render views or view files. The render(), renderPartial() and renderFile() methods will use this view object to implement the actual view rendering. If not set, it will default to the "view" application component. public yii\base\View|yii\web\View getView ( )return yii\base\View|yii\web\View The view object that can be used to render views or view files.

base\Controller getModules()

getModules() public method Returns all ancestor modules of this controller. The first module in the array is the outermost one (i.e., the application instance), while the last is the innermost one. public yii\base\Module[] getModules ( )return yii\base\Module[] All ancestor modules that this controller is located within.

base\Controller getRoute()

getRoute() public method Returns the route of the current request. public string getRoute ( )return string The route (module ID, controller ID and action ID) of the current request.

base\Controller getUniqueId()

getUniqueId() public method Returns the unique ID of the controller. public string getUniqueId ( )return string The controller ID that is prefixed with the module ID (if any).

base\Controller EVENT_AFTER_ACTION

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

base\Controller findLayoutFile()

findLayoutFile() public method Finds the applicable layout file. public string|boolean findLayoutFile ( $view )$view yii\base\View The view object to render the layout file. return string|boolean The layout file path, or false if layout is not needed. Please refer to render() on how to specify this parameter. throws yii\base\InvalidParamException if an invalid path alias is used to specify the layout.

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 str

base\Controller EVENT_BEFORE_ACTION

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

base\Controller afterAction()

afterAction() public method This method is invoked right after an action 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, $result )$action yii\

base\Controller actions()

actions() public method Declares external actions for the controller. This method is meant to be overwritten to declare external actions for the controller. It should return an array, with array keys being action IDs, and array values the corresponding action class names or action configuration arrays. For example, return [ 'action1' => 'app\components\Action1', 'action2' => [ 'class' => 'app\components\Action2', 'property1' => 'value1', 'property