Skip to content

Commit 1934d9d

Browse files
committed
API core changes
1 parent a152d89 commit 1934d9d

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

JqueryFileUpload.php

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,26 @@
99

1010
namespace gplcart\modules\jquery_file_upload;
1111

12-
use gplcart\core\Module,
13-
gplcart\core\Config;
12+
use gplcart\core\Library;
1413

1514
/**
1615
* Main class for Jquery File Upload module
1716
*/
18-
class JqueryFileUpload extends Module
17+
class JqueryFileUpload
1918
{
2019

2120
/**
22-
* @param Config $config
21+
* Library class instance
22+
* @var \gplcart\core\Library $library
2323
*/
24-
public function __construct(Config $config)
24+
protected $library;
25+
26+
/**
27+
* @param Library $library
28+
*/
29+
public function __construct(Library $library)
2530
{
26-
parent::__construct($config);
31+
$this->library = $library;
2732
}
2833

2934
/**
@@ -53,31 +58,31 @@ public function hookLibraryList(array &$libraries)
5358
*/
5459
public function hookModuleEnableAfter()
5560
{
56-
$this->getLibrary()->clearCache();
61+
$this->library->clearCache();
5762
}
5863

5964
/**
6065
* Implements hook "module.disable.after"
6166
*/
6267
public function hookModuleDisableAfter()
6368
{
64-
$this->getLibrary()->clearCache();
69+
$this->library->clearCache();
6570
}
6671

6772
/**
6873
* Implements hook "module.install.after"
6974
*/
7075
public function hookModuleInstallAfter()
7176
{
72-
$this->getLibrary()->clearCache();
77+
$this->library->clearCache();
7378
}
7479

7580
/**
7681
* Implements hook "module.uninstall.after"
7782
*/
7883
public function hookModuleUninstallAfter()
7984
{
80-
$this->getLibrary()->clearCache();
85+
$this->library->clearCache();
8186
}
8287

8388
}

0 commit comments

Comments
 (0)