1 | <?php |
||
19 | class Shippo |
||
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 | * @param Module $module |
||
36 | * @param Library $library |
||
37 | */ |
||
38 | public function __construct(Module $module, Library $library) |
||
43 | |||
44 | /** |
||
45 | * Implements hook "library.list" |
||
46 | * @param array $libraries |
||
47 | */ |
||
48 | public function hookLibraryList(array &$libraries) |
||
67 | |||
68 | /** |
||
69 | * Implements hook "route.list" |
||
70 | * @param array $routes |
||
71 | */ |
||
72 | public function hookRouteList(array &$routes) |
||
89 | |||
90 | /** |
||
91 | * Implements hook "module.install.before" |
||
92 | * @param mixed $result |
||
93 | */ |
||
94 | public function hookModuleInstallBefore(&$result) |
||
100 | |||
101 | /** |
||
102 | * Implements hook "user.role.permissions" |
||
103 | * @param array $permissions |
||
104 | */ |
||
105 | public function hookUserRolePermissions(array &$permissions) |
||
109 | |||
110 | /** |
||
111 | * Implements hook "order.calculate.before" |
||
112 | * @param mixed $data |
||
113 | */ |
||
114 | public function hookOrderCalculateBefore(array &$data) |
||
118 | |||
119 | /** |
||
120 | * Implements hook "order.submit.before" |
||
121 | * @param array $order |
||
122 | * @param array $options |
||
123 | * @param array $result |
||
124 | */ |
||
125 | public function hookOrderSubmitBefore(&$order, $options, &$result) |
||
129 | |||
130 | /** |
||
131 | * Implements hook "shipping.methods" |
||
132 | * @param mixed $methods |
||
133 | */ |
||
134 | public function hookShippingMethods(array &$methods) |
||
138 | |||
139 | /** |
||
140 | * Implements hook "module.enable.after" |
||
141 | */ |
||
142 | public function hookModuleEnableAfter() |
||
146 | |||
147 | /** |
||
148 | * Implements hook "module.disable.after" |
||
149 | */ |
||
150 | public function hookModuleDisableAfter() |
||
154 | |||
155 | /** |
||
156 | * Implements hook "module.install.after" |
||
157 | */ |
||
158 | public function hookModuleInstallAfter() |
||
162 | |||
163 | /** |
||
164 | * Implements hook "module.uninstall.after" |
||
165 | */ |
||
166 | public function hookModuleUninstallAfter() |
||
170 | |||
171 | /** |
||
172 | * Sets module shipping methods |
||
173 | * @param array $methods |
||
174 | */ |
||
175 | protected function setShippingMethods(array &$methods) |
||
189 | |||
190 | /** |
||
191 | * Returns Shippo's model instance |
||
192 | * @return \gplcart\modules\shippo\models\Shippo |
||
193 | */ |
||
194 | public function getModel() |
||
198 | |||
199 | /** |
||
200 | * Translation UI model class instance |
||
201 | * @return \gplcart\core\models\Translation |
||
202 | */ |
||
203 | protected function getTranslationModel() |
||
207 | |||
208 | } |
||
209 |