-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModule.php
44 lines (42 loc) · 919 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
<?php
/**
* @link http://www.tintsoft.com/
* @copyright Copyright (c) 2012 TintSoft Technology Co. Ltd.
* @license http://www.tintsoft.com/license/
*/
namespace yuncms\note;
use Yii;
use yii\base\InvalidParamException;
/**
* Class Module
* Example application configuration:
*
* ```php
* 'modules' => [
* 'note' => [
* 'class' => 'yuncms\note\Module',
* ],
* ],
* ```
* @package note
*/
class Module extends \yii\base\Module
{
/**
* 初始化模块
*/
public function init()
{
parent::init();
/**
* 注册语言包
*/
if (!isset(Yii::$app->i18n->translations['note*'])) {
Yii::$app->i18n->translations['note*'] = [
'class' => 'yii\i18n\PhpMessageSource',
'sourceLanguage' => 'en-US',
'basePath' => __DIR__ . '/messages',
];
}
}
}