/** * * @return type */ public function init() { parent::init(); $this->wtControllerPath = SimpleController::className(); if (\Yii::$app->user->isGuest) { return $this->redirect(['/user/login']); } else { SELF::_hooks(); } }
/** * Logs the user out and then redirects to the homepage. * * @return \yii\web\Response */ public function actionLogout() { Simple::setNull(); \Yii::$app->getUser()->logout(); return $this->goHome(); }
public function init() { parent::init(); $this->wtChildPath = DashboardController::className(); $this->setLayout('admin'); }