<?php
/**
 * Created by PhpStorm.
 * User: PHOENIX
 * Date: 10.04.16
 * Time: 14:06
 */

namespace common\modules\analyticsSchool\controllers;


use common\components\AdminController;
use common\modules\analyticsSchool\models\AnalyticsSchoolCourse;
use yii\data\ActiveDataProvider;

class CourseAdminController extends AdminController {
    /**
     * @return array|void
     */
    public static function actionsTitles(){
        return [
            'Manage' => 'Управление курсами',
        ];
    }

    /**
     * @return string
     */
    public function actionManage(){
        $dataProvider = new ActiveDataProvider([
            'query' => AnalyticsSchoolCourse::find(),
        ]);

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