1 | <?php |
||
18 | class Base extends Module |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * @param Config $config |
||
23 | */ |
||
24 | public function __construct(Config $config) |
||
28 | |||
29 | /* ---------------------- Hooks ---------------------- */ |
||
30 | |||
31 | /** |
||
32 | * Implements hook "route.list" |
||
33 | * @param array $routes |
||
34 | */ |
||
35 | public function hookRouteList(array &$routes) |
||
43 | |||
44 | /** |
||
45 | * Implements hook "install.handlers" |
||
46 | * @param array $handlers |
||
47 | */ |
||
48 | public function hookInstallHandlers(array &$handlers) |
||
52 | |||
53 | /** |
||
54 | * Implements hook "install.before" |
||
55 | * @param array $data |
||
56 | * @param mixed $result |
||
57 | */ |
||
58 | public function hookInstallBefore(array $data, &$result) |
||
62 | |||
63 | /** |
||
64 | * Implements hook "template.render" |
||
65 | * @param array $templates |
||
66 | */ |
||
67 | public function hookTemplateRender(array &$templates) |
||
71 | |||
72 | /* ---------------------- Helpers ---------------------- */ |
||
73 | |||
74 | /** |
||
75 | * Adds installation handlers |
||
76 | * @param array $handlers |
||
77 | */ |
||
78 | protected function setInstallHandlers(array &$handlers) |
||
98 | |||
99 | /** |
||
100 | * Check if all required modules in place |
||
101 | * @param array $data |
||
102 | * @param array $result |
||
103 | */ |
||
104 | protected function checkRequiredModules(array $data, &$result) |
||
117 | |||
118 | /** |
||
119 | * Replace system templates |
||
120 | * @param array $templates |
||
121 | */ |
||
122 | protected function replaceTemplates(array &$templates) |
||
128 | |||
129 | } |
||
130 |