1 | <?php |
||
18 | class Shippo extends Module |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * @param Config $config |
||
23 | */ |
||
24 | public function __construct(Config $config) |
||
28 | |||
29 | /** |
||
30 | * Implements hook "library.list" |
||
31 | * @param array $libraries |
||
32 | */ |
||
33 | public function hookLibraryList(array &$libraries) |
||
52 | |||
53 | /** |
||
54 | * Implements hook "route.list" |
||
55 | * @param array $routes |
||
56 | */ |
||
57 | public function hookRouteList(array &$routes) |
||
74 | |||
75 | /** |
||
76 | * Implements hook "user.role.permissions" |
||
77 | * @param array $permissions |
||
78 | */ |
||
79 | public function hookUserRolePermissions(array &$permissions) |
||
83 | |||
84 | /** |
||
85 | * Implements hook "order.calculate.before" |
||
86 | * @param mixed $data |
||
87 | */ |
||
88 | public function hookOrderCalculateBefore(array &$data) |
||
92 | |||
93 | /** |
||
94 | * Implements hook "order.submit.before" |
||
95 | * @param array $order |
||
96 | * @param array $options |
||
97 | * @param array $result |
||
98 | */ |
||
99 | public function hookOrderSubmitBefore(&$order, $options, &$result) |
||
103 | |||
104 | /** |
||
105 | * Implements hook "shipping.methods" |
||
106 | * @param mixed $methods |
||
107 | */ |
||
108 | public function hookShippingMethods(array &$methods) |
||
112 | |||
113 | /** |
||
114 | * Implements hook "module.enable.after" |
||
115 | */ |
||
116 | public function hookModuleEnableAfter() |
||
120 | |||
121 | /** |
||
122 | * Implements hook "module.disable.after" |
||
123 | */ |
||
124 | public function hookModuleDisableAfter() |
||
128 | |||
129 | /** |
||
130 | * Implements hook "module.install.after" |
||
131 | */ |
||
132 | public function hookModuleInstallAfter() |
||
136 | |||
137 | /** |
||
138 | * Implements hook "module.uninstall.after" |
||
139 | */ |
||
140 | public function hookModuleUninstallAfter() |
||
144 | |||
145 | /** |
||
146 | * Implements hook "module.install.before" |
||
147 | * @param mixed $result |
||
148 | */ |
||
149 | public function hookModuleInstallBefore(&$result) |
||
155 | |||
156 | /** |
||
157 | * Returns Shippo's model instance |
||
158 | * @return \gplcart\modules\shippo\models\Shippo |
||
159 | */ |
||
160 | public function getShippoModel() |
||
166 | |||
167 | /** |
||
168 | * Sets module shipping methods |
||
169 | * @param array $methods |
||
170 | */ |
||
171 | protected function setShippingMethods(array &$methods) |
||
186 | |||
187 | } |
||
188 |