1 | <?php |
||
19 | class Module |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Module class instance |
||
24 | * @var \gplcart\core\Module $module |
||
25 | */ |
||
26 | protected $module; |
||
27 | |||
28 | /** |
||
29 | * Library class instance |
||
30 | * @var \gplcart\core\Library $library |
||
31 | */ |
||
32 | protected $library; |
||
33 | |||
34 | /** |
||
35 | * Session helper class instance |
||
36 | * @var \gplcart\core\helpers\Session $session |
||
37 | */ |
||
38 | protected $session; |
||
39 | |||
40 | /** |
||
41 | * @param CoreModule $module |
||
42 | * @param Library $library |
||
43 | * @param SessionHelper $session |
||
44 | */ |
||
45 | public function __construct(CoreModule $module, Library $library, SessionHelper $session) |
||
51 | |||
52 | /** |
||
53 | * Implements hook "library.list" |
||
54 | * @param array $libraries |
||
55 | */ |
||
56 | public function hookLibraryList(array &$libraries) |
||
75 | |||
76 | /** |
||
77 | * Implements hook "route.list" |
||
78 | * @param array $routes |
||
79 | */ |
||
80 | public function hookRouteList(array &$routes) |
||
89 | |||
90 | /** |
||
91 | * Implements hook "theme" |
||
92 | * @param \gplcart\core\Controller $controller |
||
93 | */ |
||
94 | public function hookTheme($controller) |
||
98 | |||
99 | /** |
||
100 | * Implements hook "module.enable.after" |
||
101 | */ |
||
102 | public function hookModuleEnableAfter() |
||
106 | |||
107 | /** |
||
108 | * Implements hook "module.disable.after" |
||
109 | */ |
||
110 | public function hookModuleDisableAfter() |
||
114 | |||
115 | /** |
||
116 | * Implements hook "module.install.after" |
||
117 | */ |
||
118 | public function hookModuleInstallAfter() |
||
122 | |||
123 | /** |
||
124 | * Implements hook "module.uninstall.after" |
||
125 | */ |
||
126 | public function hookModuleUninstallAfter() |
||
130 | |||
131 | /** |
||
132 | * Returns a device type |
||
133 | * @return string |
||
134 | */ |
||
135 | public function getDeviceType() |
||
160 | |||
161 | /** |
||
162 | * Returns instance on detector class |
||
163 | * @return \Mobile_Detect |
||
164 | * @throws \InvalidArgumentException |
||
165 | */ |
||
166 | public function getLibrary() |
||
176 | |||
177 | /** |
||
178 | * Switch the current theme |
||
179 | * @param \gplcart\core\Controller $controller |
||
180 | */ |
||
181 | protected function switchTheme($controller) |
||
203 | |||
204 | } |
||
205 |