1 | <?php |
||
15 | class Main |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * Implements hook "module.install.before" |
||
20 | * @param null|string $result |
||
21 | */ |
||
22 | public function hookModuleInstallBefore(&$result) |
||
23 | { |
||
24 | if (!class_exists('ZipArchive')) { |
||
25 | $result = gplcart_text('Class ZipArchive does not exist'); |
||
26 | } |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Implements hook "route.list" |
||
31 | * @param array $routes |
||
32 | */ |
||
33 | public function hookRouteList(array &$routes) |
||
34 | { |
||
35 | $routes['admin/module/install'] = array( |
||
36 | 'menu' => array( |
||
37 | 'admin' => 'Install' // @text |
||
38 | ), |
||
39 | 'access' => 'module_installer_upload', |
||
40 | 'handlers' => array( |
||
41 | 'controller' => array('gplcart\\modules\\installer\\controllers\\Upload', 'editUpload') |
||
42 | ) |
||
43 | ); |
||
44 | |||
45 | $routes['admin/module/install/download'] = array( |
||
46 | 'access' => 'module_installer_download', |
||
47 | 'handlers' => array( |
||
48 | 'controller' => array('gplcart\\modules\\installer\\controllers\\Download', 'editDownload') |
||
49 | ) |
||
50 | ); |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * Implements hook "user.permissions" |
||
55 | * @param array $permissions |
||
56 | */ |
||
57 | public function hookUserPermissions(array &$permissions) |
||
62 | |||
63 | /** |
||
64 | * Implements hook "job.handlers" |
||
65 | * @param array $handlers |
||
66 | */ |
||
67 | public function hookJobHandlers(array &$handlers) |
||
75 | |||
76 | /** |
||
77 | * Implements hook "hook.cron" |
||
78 | */ |
||
79 | public function hookCronRunAfter() |
||
83 | |||
84 | } |
||
85 |