yii\base\Action::beforeRun PHP Метод

beforeRun() защищенный Метод

You may override this method to do preparation work for the action run. If the method returns false, it will cancel the action.
protected beforeRun ( ) : boolean
Результат boolean whether to run the action.
    protected function beforeRun()
    {
        return true;
    }

Usage Example

 /**
  * @return bool
  */
 public function beforeRun()
 {
     Yii::$app->view->title = 'Update Record';
     Yii::$app->view->params['breadcrumbs'][] = ['label' => 'Review Errors', 'url' => ['review-errors', 'id' => Yii::$app->request->get('id')]];
     Yii::$app->view->params['breadcrumbs'][] = Yii::$app->view->title;
     return parent::beforeRun();
 }
All Usage Examples Of yii\base\Action::beforeRun