1 | <?php |
||
18 | class Module |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * Config class instance |
||
23 | * @var \gplcart\core\Config $config |
||
24 | */ |
||
25 | protected $config; |
||
26 | |||
27 | /** |
||
28 | * @param Config $config |
||
29 | */ |
||
30 | public function __construct(Config $config) |
||
34 | |||
35 | /** |
||
36 | * Implements hook "route.list" |
||
37 | * @param array $routes |
||
38 | */ |
||
39 | public function hookRouteList(array &$routes) |
||
47 | |||
48 | /** |
||
49 | * Implements hook "install.handlers" |
||
50 | * @param array $handlers |
||
51 | */ |
||
52 | public function hookInstallHandlers(array &$handlers) |
||
56 | |||
57 | /** |
||
58 | * Implements hook "install.before" |
||
59 | * @param array $data |
||
60 | * @param mixed $result |
||
61 | */ |
||
62 | public function hookInstallBefore(array $data, &$result) |
||
66 | |||
67 | /** |
||
68 | * Implements hook "template.render" |
||
69 | * @param array $templates |
||
70 | */ |
||
71 | public function hookTemplateRender(array &$templates) |
||
75 | |||
76 | /** |
||
77 | * Adds installation handlers |
||
78 | * @param array $handlers |
||
79 | */ |
||
80 | protected function setInstallHandlers(array &$handlers) |
||
100 | |||
101 | /** |
||
102 | * Check if all required modules in place |
||
103 | * @param array $data |
||
104 | * @param array $result |
||
105 | */ |
||
106 | protected function checkRequiredModules(array $data, &$result) |
||
116 | |||
117 | /** |
||
118 | * Replace system templates |
||
119 | * @param array $templates |
||
120 | */ |
||
121 | protected function replaceTemplates(array &$templates) |
||
127 | |||
128 | /** |
||
129 | * Returns the module model |
||
130 | * @return \gplcart\modules\base\models\Installer |
||
131 | */ |
||
132 | protected function getModel() |
||
136 | |||
137 | /** |
||
138 | * Translation UI model instance |
||
139 | * @return \gplcart\core\models\Translation |
||
140 | */ |
||
141 | protected function getTranslationModel() |
||
145 | |||
146 | } |
||
147 |