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 beforeAction()

beforeAction() public method This method is invoked right before an action 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 should look like the

base\Controller $viewPath

$viewPath public property The directory containing the view files for this controller. public string getViewPath ( )public void setViewPath ( $path )

base\Controller $route

$route public read-only property The route (module ID, controller ID and action ID) of the current request. public string getRoute ( )

base\Controller $uniqueId

$uniqueId public read-only property The controller ID that is prefixed with the module ID (if any). public string getUniqueId ( )

base\Controller $view

$view public property The view object that can be used to render views or view files. public yii\base\View|yii\web\View getView ( )public void setView ( $view )

base\Controller $module

$module public property The module that this controller belongs to. public yii\base\Module $module = null

base\Controller $layout

$layout public property The name of the layout to be applied to this controller's views. This property mainly affects the behavior of render(). Defaults to null, meaning the actual layout value should inherit that from $module's layout value. If false, no layout will be applied. public null|string|false $layout = null

base\Controller $id

$id public property The ID of this controller. public string $id = null

base\Controller $modules

$modules public read-only property All ancestor modules that this controller is located within. public yii\base\Module[] getModules ( )