-
Notifications
You must be signed in to change notification settings - Fork 1
/
Module.php
52 lines (45 loc) · 956 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
41
42
43
44
45
46
47
48
49
50
51
52
<?php
namespace omcrn\portfolio;
use yii\helpers\Url;
/**
* portfolio module definition class
*/
class Module extends \yii\base\Module
{
/**
* @inheritdoc
*/
/**
* @var string
*/
public $controllerNamespace = 'omcrn\portfolio\controllers';
/**
* @inheritdoc
*/
/**
* @var null|string
*/
public $mediaUrlPrefix = null;
/**
* @var string
*/
public $mediaUrlReplacement = '{{media_item_url_prefix}}';
/**
* Module constructor.
* @param string $id
* @param null $parent
* @param array $config
*/
public function __construct($id, $parent = null, $config = [])
{
parent::__construct($id, $parent, $config);
if (!$this->mediaUrlPrefix){
$this->mediaUrlPrefix = Url::base(true);
}
}
public function init()
{
parent::init();
// custom initialization code goes here
}
}