app\components\Helper::checkApplication PHP Method

checkApplication() public static method

public static checkApplication ( )
    public static function checkApplication()
    {
        if (\Yii::$app->user->can('Admin')) {
            self::checkPassword(getenv('APP_ADMIN_PASSWORD'));
            self::checkUserSetup();
            self::checkPagesSetup();
        }
    }

Usage Example

 /**
  * Renders the start page
  * @return string
  */
 public function actionIndex()
 {
     Helper::checkApplication();
     if (!Yii::$app->user->isGuest) {
         return $this->render('user_index');
     }
     return $this->render('index');
 }
All Usage Examples Of app\components\Helper::checkApplication