|
9 | 9 |
|
10 | 10 | namespace gplcart\modules\jquery_file_upload; |
11 | 11 |
|
12 | | -use gplcart\core\Module, |
13 | | - gplcart\core\Config; |
| 12 | +use gplcart\core\Library; |
14 | 13 |
|
15 | 14 | /** |
16 | 15 | * Main class for Jquery File Upload module |
17 | 16 | */ |
18 | | -class JqueryFileUpload extends Module |
| 17 | +class JqueryFileUpload |
19 | 18 | { |
20 | 19 |
|
21 | 20 | /** |
22 | | - * @param Config $config |
| 21 | + * Library class instance |
| 22 | + * @var \gplcart\core\Library $library |
23 | 23 | */ |
24 | | - public function __construct(Config $config) |
| 24 | + protected $library; |
| 25 | + |
| 26 | + /** |
| 27 | + * @param Library $library |
| 28 | + */ |
| 29 | + public function __construct(Library $library) |
25 | 30 | { |
26 | | - parent::__construct($config); |
| 31 | + $this->library = $library; |
27 | 32 | } |
28 | 33 |
|
29 | 34 | /** |
@@ -53,31 +58,31 @@ public function hookLibraryList(array &$libraries) |
53 | 58 | */ |
54 | 59 | public function hookModuleEnableAfter() |
55 | 60 | { |
56 | | - $this->getLibrary()->clearCache(); |
| 61 | + $this->library->clearCache(); |
57 | 62 | } |
58 | 63 |
|
59 | 64 | /** |
60 | 65 | * Implements hook "module.disable.after" |
61 | 66 | */ |
62 | 67 | public function hookModuleDisableAfter() |
63 | 68 | { |
64 | | - $this->getLibrary()->clearCache(); |
| 69 | + $this->library->clearCache(); |
65 | 70 | } |
66 | 71 |
|
67 | 72 | /** |
68 | 73 | * Implements hook "module.install.after" |
69 | 74 | */ |
70 | 75 | public function hookModuleInstallAfter() |
71 | 76 | { |
72 | | - $this->getLibrary()->clearCache(); |
| 77 | + $this->library->clearCache(); |
73 | 78 | } |
74 | 79 |
|
75 | 80 | /** |
76 | 81 | * Implements hook "module.uninstall.after" |
77 | 82 | */ |
78 | 83 | public function hookModuleUninstallAfter() |
79 | 84 | { |
80 | | - $this->getLibrary()->clearCache(); |
| 85 | + $this->library->clearCache(); |
81 | 86 | } |
82 | 87 |
|
83 | 88 | } |
0 commit comments