1 | <?php |
||
19 | class Module |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Database class instance |
||
24 | * @var \gplcart\core\Database $db |
||
25 | */ |
||
26 | protected $db; |
||
27 | |||
28 | /** |
||
29 | * Module class instance |
||
30 | * @var \gplcart\core\Module $module |
||
31 | */ |
||
32 | protected $module; |
||
33 | |||
34 | /** |
||
35 | * Library class instance |
||
36 | * @var \gplcart\core\Library $library |
||
37 | */ |
||
38 | protected $library; |
||
39 | |||
40 | /** |
||
41 | * @param Config $config |
||
42 | * @param Library $library |
||
43 | * @param CoreModule $module |
||
44 | */ |
||
45 | public function __construct(Config $config, Library $library, CoreModule $module) |
||
51 | |||
52 | /** |
||
53 | * Implements hook "construct" |
||
54 | */ |
||
55 | public function hookConstruct() |
||
59 | |||
60 | /** |
||
61 | * Implements hook "construct.controller" |
||
62 | * @param \gplcart\core\Controller $controller |
||
63 | */ |
||
64 | public function hookConstructController($controller) |
||
68 | |||
69 | /** |
||
70 | * Implements hook "template.output" |
||
71 | * @param string $html |
||
72 | * @param \gplcart\core\Controller $controller |
||
73 | */ |
||
74 | public function hookTemplateOutput(&$html, $controller) |
||
78 | |||
79 | /** |
||
80 | * Implements hook "library.list" |
||
81 | * @param array $libraries |
||
82 | */ |
||
83 | public function hookLibraryList(array &$libraries) |
||
98 | |||
99 | /** |
||
100 | * Implements hook "route.list" |
||
101 | * @param array $routes |
||
102 | */ |
||
103 | public function hookRouteList(array &$routes) |
||
112 | |||
113 | /** |
||
114 | * Implements hook "module.enable.after" |
||
115 | */ |
||
116 | public function hookModuleEnableAfter() |
||
120 | |||
121 | /** |
||
122 | * Implements hook "module.disable.after" |
||
123 | */ |
||
124 | public function hookModuleDisableAfter() |
||
128 | |||
129 | /** |
||
130 | * Implements hook "module.install.after" |
||
131 | */ |
||
132 | public function hookModuleInstallAfter() |
||
136 | |||
137 | /** |
||
138 | * Implements hook "module.uninstall.after" |
||
139 | */ |
||
140 | public function hookModuleUninstallAfter() |
||
144 | |||
145 | /** |
||
146 | * Returns a path to Kint's init file |
||
147 | * @return string |
||
148 | */ |
||
149 | public function getKintFile() |
||
153 | |||
154 | /** |
||
155 | * Sets module specific assets |
||
156 | * @param \gplcart\core\Controller $controller |
||
157 | */ |
||
158 | protected function setModuleAssets($controller) |
||
169 | |||
170 | /** |
||
171 | * Adds toolbar |
||
172 | * @param string $html |
||
173 | * @param \gplcart\core\Controller $controller |
||
174 | */ |
||
175 | protected function setDevToolbar(&$html, $controller) |
||
192 | |||
193 | } |
||
194 |