1 | <?php |
||
19 | class Main |
||
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) |
||
91 | |||
92 | /** |
||
93 | * Implements hook "user.role.permissions" |
||
94 | * @param array $permissions |
||
95 | */ |
||
96 | public function hookUserRolePermissions(array &$permissions) |
||
100 | |||
101 | /** |
||
102 | * Implements hook "order.calculate.before" |
||
103 | * @param mixed $data |
||
104 | */ |
||
105 | public function hookOrderCalculateBefore(array &$data) |
||
111 | |||
112 | /** |
||
113 | * Implements hook "order.submit.before" |
||
114 | * @param array $order |
||
115 | * @param array $options |
||
116 | * @param array $result |
||
117 | */ |
||
118 | public function hookOrderSubmitBefore(&$order, $options, &$result) |
||
122 | |||
123 | /** |
||
124 | * Implements hook "shipping.methods" |
||
125 | * @param mixed $methods |
||
126 | */ |
||
127 | public function hookShippingMethods(array &$methods) |
||
131 | |||
132 | /** |
||
133 | * Implements hook "module.enable.after" |
||
134 | */ |
||
135 | public function hookModuleEnableAfter() |
||
139 | |||
140 | /** |
||
141 | * Implements hook "module.disable.after" |
||
142 | */ |
||
143 | public function hookModuleDisableAfter() |
||
147 | |||
148 | /** |
||
149 | * Implements hook "module.install.after" |
||
150 | */ |
||
151 | public function hookModuleInstallAfter() |
||
155 | |||
156 | /** |
||
157 | * Implements hook "module.uninstall.after" |
||
158 | */ |
||
159 | public function hookModuleUninstallAfter() |
||
163 | |||
164 | /** |
||
165 | * Returns an array of Shippo's shipping methods |
||
166 | * @param bool $only_enabled |
||
167 | * @return array |
||
168 | */ |
||
169 | public function getShippingMethods($only_enabled = true) |
||
187 | |||
188 | /** |
||
189 | * Calculate shipping |
||
190 | * @param $data |
||
191 | */ |
||
192 | public function calculate(&$data) |
||
196 | |||
197 | /** |
||
198 | * Returns Shippo's model instance |
||
199 | * @return \gplcart\modules\shippo\models\Shippo |
||
200 | */ |
||
201 | public function getModel() |
||
207 | |||
208 | } |
||
209 |