From ddeab345bb178025fcb3931b0be4f3c84b0b74ab Mon Sep 17 00:00:00 2001 From: Kalinin Alexandr Date: Sun, 19 Jun 2016 16:56:22 +0300 Subject: [PATCH] Update SiteController.php (#61) [skip ci] --- controllers/SiteController.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/controllers/SiteController.php b/controllers/SiteController.php index df1a0d3..36dc959 100644 --- a/controllers/SiteController.php +++ b/controllers/SiteController.php @@ -11,6 +11,9 @@ use app\models\ContactForm; class SiteController extends Controller { + /** + * @inheritdoc + */ public function behaviors() { return [ @@ -34,6 +37,9 @@ class SiteController extends Controller ]; } + /** + * @inheritdoc + */ public function actions() { return [ @@ -47,11 +53,21 @@ class SiteController extends Controller ]; } + /** + * Displays homepage. + * + * @return string + */ public function actionIndex() { return $this->render('index'); } + /** + * Login action. + * + * @return string + */ public function actionLogin() { if (!Yii::$app->user->isGuest) { @@ -67,6 +83,11 @@ class SiteController extends Controller ]); } + /** + * Logout action. + * + * @return string + */ public function actionLogout() { Yii::$app->user->logout(); @@ -74,6 +95,11 @@ class SiteController extends Controller return $this->goHome(); } + /** + * Displays contact page. + * + * @return string + */ public function actionContact() { $model = new ContactForm(); @@ -87,6 +113,11 @@ class SiteController extends Controller ]); } + /** + * Displays about page. + * + * @return string + */ public function actionAbout() { return $this->render('about');