Completed
Push — master ( ae08e3...aed614 )
by Alexey
03:06
created

Module::t()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 4
1
<?php
2
3
namespace modules\admin;
4
5
use Yii;
6
7
/**
8
 * Class Module
9
 * @package modules\admin
10
 */
11
class Module extends \yii\base\Module
12
{
13
    /**
14
     * @inheritdoc
15
     */
16
    public $controllerNamespace = 'modules\admin\controllers';
17
18
    /**
19
     * @inheritdoc
20
     */
21
    public function init()
22
    {
23
        parent::init();
24
        $this->setViewPath('@modules/admin/views');
25
    }
26
27
    /**
28
     * @param string $category
29
     * @param string $message
30
     * @param array $params
31
     * @param null|string $language
32
     * @return string
33
     */
34
    public static function t($category, $message, $params = [], $language = null)
35
    {
36
        return Yii::t('modules/admin/' . $category, $message, $params, $language);
37
    }
38
}
39