Total Complexity | 8 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | trait HasModuleConfig |
||
18 | { |
||
19 | public function config(string $key = null, $default = null): mixed |
||
20 | { |
||
21 | $key = $key ? sprintf('%s.%s', $this->getId(), $key) : $this->getId(); |
||
22 | |||
23 | return config($key, $default); |
||
24 | } |
||
25 | |||
26 | public function areMigrationsEnabled(): bool |
||
27 | { |
||
28 | return (bool) $this->config('migrations', true); |
||
29 | } |
||
30 | |||
31 | public function areModelsEnabled(): bool |
||
34 | } |
||
35 | |||
36 | public function areViewsEnabled(): bool |
||
39 | } |
||
40 | |||
41 | public function areRoutesEnabled(): bool |
||
44 | } |
||
45 | |||
46 | abstract public function getId(): string; |
||
47 | |||
48 | /** |
||
49 | * Returns the "cascade" configuration: the "apply to all submodules" config override array |
||
50 | * |
||
51 | * @return array |
||
52 | */ |
||
53 | protected function getCascadeModuleConfiguration(): array |
||
60 |