| 1 | <?php |
||
| 10 | class ParcelSize implements ArrayInterface |
||
| 11 | { |
||
| 12 | const SMALL = 'SMALL'; |
||
| 13 | const MEDIUM = 'MEDIUM'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Sets the option array for the small and medium |
||
| 17 | * parcel option in admin section of the extension |
||
| 18 | * |
||
| 19 | * @return array |
||
| 20 | */ |
||
| 21 | 2 | public function toOptionArray() |
|
| 22 | { |
||
| 23 | $options = [ |
||
| 24 | [ |
||
| 25 | 2 | 'value' => static::SMALL, |
|
| 26 | 2 | 'label' => __('Small Parcel (up to 2kg)') |
|
| 27 | 2 | ], |
|
| 28 | [ |
||
| 29 | 2 | 'value' => static::MEDIUM, |
|
| 30 | 2 | 'label' => __('Medium Parcel') |
|
| 31 | 2 | ] |
|
| 32 | 2 | ]; |
|
| 33 | |||
| 34 | 2 | return $options; |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Get options in "key-value" format |
||
| 39 | * |
||
| 40 | * @return array |
||
| 41 | */ |
||
| 42 | public function toArray() |
||
| 48 | } |
||
| 49 |