1 | <?php |
||
11 | class StockbaseConfiguration |
||
12 | { |
||
13 | |||
14 | const CONFIG_MODULE_ENABLED = 'stockbase/integration/module_enabled'; |
||
15 | const CONFIG_ENVIRONMENT = 'stockbase/integration/environment'; |
||
16 | const CONFIG_USERNAME = 'stockbase/integration/username'; |
||
17 | const CONFIG_PASSWORD = 'stockbase/integration/password'; |
||
18 | const CONFIG_EAN_FIELD = 'stockbase/integration/ean_field'; |
||
19 | const CONFIG_ORDER_PREFIX = 'stockbase/integration/order_prefix'; |
||
20 | const CONFIG_IMAGES_SYNC = 'stockbase/integration/images_sync_enabled'; |
||
21 | const CONFIG_IMAGES_EANS = 'stockbase/integration/images_eans'; |
||
22 | |||
23 | /** |
||
24 | * @var ScopeConfigInterface |
||
25 | */ |
||
26 | private $scopeConfig; |
||
27 | |||
28 | /** |
||
29 | * StockbaseConfiguration constructor. |
||
30 | 2 | * @param ScopeConfigInterface $scopeConfig |
|
31 | */ |
||
32 | 2 | public function __construct(ScopeConfigInterface $scopeConfig) |
|
36 | |||
37 | /** |
||
38 | 2 | * @return bool |
|
39 | */ |
||
40 | 2 | public function isModuleEnabled() |
|
44 | |||
45 | /** |
||
46 | * Gets Stockbase environment name. |
||
47 | * |
||
48 | 2 | * @return string |
|
49 | */ |
||
50 | 2 | public function getEnvironment() |
|
54 | |||
55 | /** |
||
56 | 2 | * @return string |
|
57 | */ |
||
58 | 2 | public function getUsername() |
|
62 | |||
63 | /** |
||
64 | 2 | * @return string |
|
65 | */ |
||
66 | 2 | public function getPassword() |
|
70 | |||
71 | /** |
||
72 | 2 | * @return string |
|
73 | */ |
||
74 | 2 | public function getEanFieldName() |
|
78 | |||
79 | /** |
||
80 | 2 | * @return string |
|
81 | */ |
||
82 | 2 | public function getOrderPrefix() |
|
86 | |||
87 | /** |
||
88 | * @return bool |
||
89 | */ |
||
90 | public function isImagesSyncEnabled() |
||
94 | |||
95 | /** |
||
96 | * @return mixed |
||
97 | */ |
||
98 | public function getImagesEans() |
||
102 | |||
103 | /** |
||
104 | * @return mixed |
||
105 | */ |
||
106 | public function saveImagesEans($eans) |
||
110 | |||
111 | } |
||
112 |