-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathModule.php
executable file
·50 lines (42 loc) · 1.28 KB
/
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
<?php
namespace suver\behavior\upload;
/**
* user module definition class
*/
class Module extends \yii\base\Module
{
/**
* @inheritdoc
*/
public $controllerNamespace = 'suver\behavior\upload\controller';
public $storageDomain = '';
public $defaultDomain = '';
public $menu = [];
/**
* @inheritdoc
*/
public function init()
{
parent::init();
/*$this->menu = [
[
'label' => '<i class="fa fa-home"></i> Загруженые файлы',
'url' => ['/books'],
'alias' => ['uploads'],
'items' => [
[
'label' => 'Каталог книг',
'url' => ['/uploads/list'],
'alias' => ['uploads/list'],
],
],
],
];*/
if (\Yii::$app instanceof \yii\console\Application) {
$this->controllerNamespace = 'suver\behavior\upload\commands';
}
// инициализация модуля с помощью конфигурации, загруженной из config.php
\Yii::configure($this, require(__DIR__ . '/config.php'));
// custom initialization code goes here
}
}