| 1 | <?php namespace Bedard\Shop\Models; |
||
| 8 | class ApiSettings extends Model |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var array Behaviors |
||
| 12 | */ |
||
| 13 | public $implement = ['System.Behaviors.SettingsModel']; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string Settings code |
||
| 17 | */ |
||
| 18 | public $settingsCode = 'bedard_shop_api_settings'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string Settings fields |
||
| 22 | */ |
||
| 23 | public $settingsFields = 'fields.yaml'; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Get the enabled status of the api endpoints. |
||
| 27 | * |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | public static function isEnabled() |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Get options for cart endpoint. |
||
| 37 | * |
||
| 38 | * @return array |
||
| 39 | */ |
||
| 40 | public static function getCartOptions() |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Get options for categories endpoint. |
||
| 47 | * |
||
| 48 | * @return array |
||
| 49 | */ |
||
| 50 | public static function getCategoriesOptions() |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Get options for category endpoint. |
||
| 57 | * |
||
| 58 | * @return array |
||
| 59 | */ |
||
| 60 | public static function getCategoryOptions() |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Get options for products endpoint. |
||
| 67 | * |
||
| 68 | * @return array |
||
| 69 | */ |
||
| 70 | public static function getProductsOptions() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Get options for product endpoint. |
||
| 77 | * |
||
| 78 | * @return array |
||
| 79 | */ |
||
| 80 | public static function getProductOptions() |
||
| 84 | } |
||
| 85 |