| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function init() |
||
| 43 | { |
||
| 44 | parent::init(); |
||
| 45 | |||
| 46 | // Это здесь для того, чтобы переключаться между frontend и backend |
||
| 47 | if ($this->isBackend === true) { |
||
| 48 | $this->controllerNamespace = 'modules\users\controllers\backend'; |
||
| 49 | $this->setViewPath('@modules/users/views/backend'); |
||
| 50 | } else { |
||
| 51 | $this->setViewPath('@modules/users/views/frontend'); |
||
| 52 | } |
||
| 53 | if (Yii::$app instanceof ConsoleApplication) { |
||
| 54 | $this->controllerNamespace = 'modules\users\commands'; |
||
| 55 | } |
||
| 70 |