<?php
/**
 * Created by PhpStorm.
 * User: PHOENIX
 * Date: 18.04.16
 * Time: 16:29
 */

namespace common\modules\analyticsSchool\controllers;


use common\components\FrontendController;
use common\modules\school\models\SearchCourses;

class CourseController extends FrontendController {
    public static function actionsTitles()
    {
        return [
            'Index'  => 'Школа аналитики'
        ];
    }

    public function actionIndex(){

        \Yii::$app->view->registerMetaTag([
            'property' => 'og:title',
            'content' => 'Школа аналитики'
        ]);
        $searchModel  = new SearchCourses();
        $search = \Yii::$app->request->queryParams;

        $dataProvider = $searchModel->search($search);

        return $this->render(
            'index',
            [
                'dataProvider' => $dataProvider
            ]
        );
    }
} 