1 | <?php |
||
12 | class StockbaseConfiguration |
||
13 | { |
||
14 | |||
15 | const CONFIG_MODULE_ENABLED = 'stockbase/integration/module_enabled'; |
||
16 | const CONFIG_ENVIRONMENT = 'stockbase/integration/environment'; |
||
17 | const CONFIG_USERNAME = 'stockbase/integration/username'; |
||
18 | const CONFIG_PASSWORD = 'stockbase/integration/password'; |
||
19 | const CONFIG_EAN_FIELD = 'stockbase/integration/ean_field'; |
||
20 | const CONFIG_ORDER_PREFIX = 'stockbase/integration/order_prefix'; |
||
21 | const CONFIG_IMAGES_SYNC = 'stockbase/integration/images_sync_enabled'; |
||
22 | const CONFIG_IMAGES_CRON_SYNC = 'stockbase/integration/images_sync_cron_enabled'; |
||
23 | const CONFIG_IMAGES_FILTER_PRODUCTS = 'stockbase/integration/images_filter_products'; |
||
24 | |||
25 | /** |
||
26 | * @var ScopeConfigInterface |
||
27 | */ |
||
28 | private $scopeConfig; |
||
29 | |||
30 | 2 | /** |
|
31 | * @var WriterInterface |
||
32 | 2 | */ |
|
33 | 2 | protected $configWriter; |
|
34 | |||
35 | /** |
||
36 | * StockbaseConfiguration constructor. |
||
37 | * @param ScopeConfigInterface $scopeConfig |
||
38 | 2 | */ |
|
39 | public function __construct( |
||
46 | |||
47 | /** |
||
48 | 2 | * @return bool |
|
49 | */ |
||
50 | 2 | public function isModuleEnabled() |
|
54 | |||
55 | /** |
||
56 | 2 | * Gets Stockbase environment name. |
|
57 | * |
||
58 | 2 | * @return string |
|
59 | */ |
||
60 | public function getEnvironment() |
||
64 | 2 | ||
65 | /** |
||
66 | 2 | * @return string |
|
67 | */ |
||
68 | public function getUsername() |
||
72 | 2 | ||
73 | /** |
||
74 | 2 | * @return string |
|
75 | */ |
||
76 | public function getPassword() |
||
80 | 2 | ||
81 | /** |
||
82 | 2 | * @return string |
|
83 | */ |
||
84 | public function getEanFieldName() |
||
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | public function getOrderPrefix() |
||
96 | |||
97 | /** |
||
98 | * @return bool |
||
99 | */ |
||
100 | public function isImagesSyncEnabled() |
||
104 | |||
105 | /** |
||
106 | * @return bool |
||
107 | */ |
||
108 | public function isImagesSyncCronEnabled() |
||
112 | |||
113 | public function filterProcessedProducts() |
||
117 | } |
||
118 |