| Conditions | 2 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function init() |
||
| 26 | { |
||
| 27 | parent::init(); |
||
| 28 | |||
| 29 | // Base template directory |
||
| 30 | Event::on(View::class, View::EVENT_REGISTER_CP_TEMPLATE_ROOTS, function (RegisterTemplateRootsEvent $e) { |
||
| 31 | if (is_dir($baseDir = $this->getBasePath() . DIRECTORY_SEPARATOR . 'templates')) { |
||
| 32 | $e->roots[$this->uniqueId] = $baseDir; |
||
| 33 | } |
||
| 34 | }); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |