forked from cakebake/yii2-actionlog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModule.php
More file actions
35 lines (30 loc) · 665 Bytes
/
Module.php
File metadata and controls
35 lines (30 loc) · 665 Bytes
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
<?php
namespace cakebake\actionlog;
use Yii;
class Module extends \yii\base\Module
{
/**
* @inheritdoc
*/
public $defaultRoute = 'log';
/**
* @inheritdoc
*/
public function init()
{
parent::init();
Yii::setAlias('@actionlog', $this->getBasePath());
$this->registerTranslations();
}
/**
* Translating module messages
*/
public function registerTranslations()
{
Yii::$app->i18n->translations['actionlog'] = [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@actionlog/messages',
'sourceLanguage' => 'en-US',
];
}
}