You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
605 B
29 lines
605 B
6 years ago
|
<?php
|
||
|
/**
|
||
|
* Created by Error202
|
||
|
* Date: 04.06.2018
|
||
|
*/
|
||
|
|
||
|
namespace frontend\components;
|
||
|
|
||
|
|
||
|
use yii\web\Controller;
|
||
|
use Yii;
|
||
|
|
||
|
class FrontendController extends Controller
|
||
|
{
|
||
|
public function init() {
|
||
|
parent::init();
|
||
|
$theme = 'start'; // sport
|
||
|
|
||
|
Yii::$app->view->theme = new \yii\base\Theme([
|
||
|
'basePath' => '@webroot/themes/' . $theme,
|
||
|
'baseUrl' => '@web/themes/' . $theme,
|
||
|
'pathMap' => [
|
||
|
'@common/modules' => '@webroot/themes/' . $theme . '/modules',
|
||
|
'@frontend/views' => '@webroot/themes/' . $theme,
|
||
|
'@frontend/widgets' => '@webroot/themes/' . $theme . '/widgets',
|
||
|
],
|
||
|
]);
|
||
|
}
|
||
|
}
|