|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* HiPanel core package. |
|
4
|
|
|
* |
|
5
|
|
|
* @link https://hipanel.com/ |
|
6
|
|
|
* @package hipanel-core |
|
7
|
|
|
* @license BSD-3-Clause |
|
8
|
|
|
* @copyright Copyright (c) 2014-2017, HiQDev (http://hiqdev.com/) |
|
9
|
|
|
*/ |
|
10
|
|
|
|
|
11
|
|
|
return [ |
|
12
|
|
|
'aliases' => [ |
|
13
|
|
|
'@organization' => $params['organization.url'], |
|
14
|
|
|
'@bower' => '@vendor/bower-asset', |
|
15
|
|
|
'@npm' => '@vendor/npm-asset', |
|
16
|
|
|
'@vendor/bower' => '@vendor/bower-asset', |
|
17
|
|
|
'@vendor/npm' => '@vendor/npm-asset', |
|
18
|
|
|
'@file' => '/file', |
|
19
|
|
|
'@reminder' => '/reminder', |
|
20
|
|
|
], |
|
21
|
|
|
'components' => [ |
|
22
|
|
|
'cache' => [ |
|
23
|
|
|
'class' => \hipanel\components\Cache::class, |
|
24
|
|
|
], |
|
25
|
|
|
'i18n' => [ |
|
26
|
|
|
'class' => \hipanel\components\I18N::class, |
|
27
|
|
|
'translations' => [ |
|
28
|
|
|
'hipanel' => [ |
|
29
|
|
|
'class' => \yii\i18n\PhpMessageSource::class, |
|
30
|
|
|
'basePath' => '@hipanel/messages', |
|
31
|
|
|
], |
|
32
|
|
|
'hipanel:synt' => [ |
|
33
|
|
|
'class' => \yii\i18n\PhpMessageSource::class, |
|
34
|
|
|
'basePath' => '@hipanel/messages', |
|
35
|
|
|
], |
|
36
|
|
|
'hipanel:block-reasons' => [ |
|
37
|
|
|
'class' => \yii\i18n\PhpMessageSource::class, |
|
38
|
|
|
'basePath' => '@hipanel/messages', |
|
39
|
|
|
], |
|
40
|
|
|
'hipanel.object-combo' => [ |
|
41
|
|
|
'class' => \yii\i18n\PhpMessageSource::class, |
|
42
|
|
|
'basePath' => '@hipanel/messages', |
|
43
|
|
|
], |
|
44
|
|
|
], |
|
45
|
|
|
], |
|
46
|
|
|
], |
|
47
|
|
|
'modules' => [ |
|
48
|
|
|
'hipanel' => [ |
|
49
|
|
|
'class' => \hipanel\Module::class, |
|
50
|
|
|
'notPanel' => $params['hipanel.notPanel'], |
|
51
|
|
|
'panelUrl' => $params['hipanel.url'], |
|
52
|
|
|
], |
|
53
|
|
|
'language' => [ |
|
54
|
|
|
'languages' => [ |
|
55
|
|
|
'en' => 'English', |
|
56
|
|
|
'ru' => 'Русский', |
|
57
|
|
|
], |
|
58
|
|
|
], |
|
59
|
|
|
], |
|
60
|
|
|
'container' => [ |
|
61
|
|
|
'singletons' => [ |
|
62
|
|
|
\Psr\Container\ContainerInterface::class => function (\yii\di\Container $container) { |
|
63
|
|
|
return new class($container) implements \Psr\Container\ContainerInterface { |
|
64
|
|
|
/** |
|
65
|
|
|
* @var \yii\di\Container |
|
66
|
|
|
*/ |
|
67
|
|
|
private $container; |
|
68
|
|
|
|
|
69
|
|
|
public function __construct(\yii\di\Container $container) |
|
70
|
|
|
{ |
|
71
|
|
|
$this->container = $container; |
|
72
|
|
|
} |
|
73
|
|
|
|
|
74
|
|
|
public function get($id) |
|
75
|
|
|
{ |
|
76
|
|
|
return $this->container->get($id); |
|
77
|
|
|
} |
|
78
|
|
|
|
|
79
|
|
|
public function has($id) |
|
80
|
|
|
{ |
|
81
|
|
|
return $this->container->has($id); |
|
82
|
|
|
} |
|
83
|
|
|
}; |
|
84
|
|
|
} |
|
85
|
|
|
] |
|
86
|
|
|
] |
|
87
|
|
|
]; |
|
88
|
|
|
|