SeoController.php 1.48 KB
<?php
    
    namespace artbox\core\controllers;
    
    use yii\filters\AccessControl;
    use yii\web\Controller;
    use yii\filters\VerbFilter;
    
    /**
     * SeoController contains actions to satisfy SEO needs of the website.
     */
    class SeoController extends Controller
    {
        /**
         * @return bool|string
         */
        public function getViewPath()
        {
            return \Yii::getAlias('@artbox/core/views/seo');
        }
        /**
         * @inheritdoc
         */
        public function behaviors()
        {
            return [
                'access' => [
                    'class' => AccessControl::className(),
                    'rules' => [
                        [
                            'actions' => [
                                'login',
                                'error',
                            ],
                            'allow'   => true,
                        ],
                        [
                            'allow' => true,
                            'roles' => [ '@' ],
                        ],
                    ],
                ],
                'verbs'  => [
                    'class'   => VerbFilter::className(),
                    'actions' => [],
                ],
            ];
        }
        
        /**
         * To be done.
         *
         * @return mixed
         */
        public function actionIndex()
        {
            return $this->render('index');
        }
    }