1 | <?php |
||
21 | class Settings extends Controller |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Shippo API model instance |
||
26 | * @var \gplcart\modules\shippo\models\Api $api |
||
27 | */ |
||
28 | protected $api; |
||
29 | |||
30 | /** |
||
31 | * Country model instance |
||
32 | * @var \gplcart\core\models\Country $country |
||
33 | */ |
||
34 | protected $country; |
||
35 | |||
36 | /** |
||
37 | * Shipping model instance |
||
38 | * @var \gplcart\core\models\Shipping $shipping |
||
39 | */ |
||
40 | protected $shipping; |
||
41 | |||
42 | /** |
||
43 | * Settings constructor. |
||
44 | * @param Shipping $shipping |
||
45 | * @param Country $country |
||
46 | * @param Api $api |
||
47 | */ |
||
48 | public function __construct(Shipping $shipping, Country $country, Api $api) |
||
56 | |||
57 | /** |
||
58 | * Route page callback to display the module settings page |
||
59 | */ |
||
60 | public function editSettings() |
||
72 | |||
73 | /** |
||
74 | * Returns an array of Shippo shipping methods |
||
75 | * @return array |
||
76 | */ |
||
77 | protected function getShippingMethodsSettings() |
||
81 | |||
82 | /** |
||
83 | * Set title on the module settings page |
||
84 | */ |
||
85 | protected function setTitleEditSettings() |
||
90 | |||
91 | /** |
||
92 | * Set breadcrumbs on the module settings page |
||
93 | */ |
||
94 | protected function setBreadcrumbEditSettings() |
||
110 | |||
111 | /** |
||
112 | * Saves the submitted settings |
||
113 | */ |
||
114 | protected function submitSettings() |
||
120 | |||
121 | /** |
||
122 | * Validate the submitted module settings |
||
123 | */ |
||
124 | protected function validateSettings() |
||
140 | |||
141 | /** |
||
142 | * Update module settings |
||
143 | */ |
||
144 | protected function updateSettings() |
||
150 | |||
151 | /** |
||
152 | * Render and output the module settings page |
||
153 | */ |
||
154 | protected function outputEditSettings() |
||
158 | |||
159 | } |
||
160 |