/
Module.php
40 lines (36 loc) · 866 Bytes
/
Module.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace hscstudio\startup;
use Yii;
use yii\bootstrap\BootstrapAsset;
use yii\bootstrap\BootstrapPluginAsset;
use yii\helpers\ArrayHelper;
/**
* Description of Module
*
* @author Hafid Mukhlasin
*/
class Module extends \yii\base\Module implements \yii\base\BootstrapInterface
{
public function init()
{
parent::init();
}
/**
*
* @param \yii\web\Application $app
*/
public function bootstrap($app)
{
$view = $app->getView();
$pathMap=[];
$pathMap['@app/views/layouts'] = '@hscstudio/startup/views/layouts';
$pathMap['@app/views/site'] = '@hscstudio/startup/views/site';
if (!empty($pathMap)) {
$view->theme = Yii::createObject([
'class' => 'yii\base\Theme',
'pathMap' => $pathMap
]);
}
$assets = $view->assetManager->publish('@hscstudio/startup/assets');
}
}