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

Module   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A t() 0 3 1
A init() 0 4 1
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