... | ... |
@@ -66,6 +66,13 @@ class Configuration implements ConfigurationInterface |
66 | 66 |
->cannotBeEmpty() |
67 | 67 |
->end() |
68 | 68 |
->end() |
69 |
+ ->arrayNode('currencies') |
|
70 |
+ ->info('Shopware currencies (SWUUID: ext. value)') |
|
71 |
+ ->defaultValue([]) |
|
72 |
+ ->scalarPrototype() |
|
73 |
+ ->cannotBeEmpty() |
|
74 |
+ ->end() |
|
75 |
+ ->end() |
|
69 | 76 |
->end() |
70 | 77 |
->end() |
71 | 78 |
->end() |
... | ... |
@@ -40,6 +40,34 @@ class Configuration implements ConfigurationInterface |
40 | 40 |
->end() |
41 | 41 |
->end() |
42 | 42 |
->end() |
43 |
+ ->arrayNode('mappings') |
|
44 |
+ ->addDefaultsIfNotSet() |
|
45 |
+ ->children() |
|
46 |
+ ->arrayNode('properties') |
|
47 |
+ ->info('Shopware property mappings (SWUUID: ext. value)') |
|
48 |
+ ->defaultValue([]) |
|
49 |
+ ->arrayPrototype() |
|
50 |
+ ->scalarPrototype() |
|
51 |
+ ->cannotBeEmpty() |
|
52 |
+ ->end() |
|
53 |
+ ->end() |
|
54 |
+ ->end() |
|
55 |
+ ->arrayNode('property_groups') |
|
56 |
+ ->info('Shopware property groups (SWUUID: ext. value)') |
|
57 |
+ ->defaultValue([]) |
|
58 |
+ ->scalarPrototype() |
|
59 |
+ ->cannotBeEmpty() |
|
60 |
+ ->end() |
|
61 |
+ ->end() |
|
62 |
+ ->arrayNode('units') |
|
63 |
+ ->info('Shopware units (SWUUID: ext. value)') |
|
64 |
+ ->defaultValue([]) |
|
65 |
+ ->scalarPrototype() |
|
66 |
+ ->cannotBeEmpty() |
|
67 |
+ ->end() |
|
68 |
+ ->end() |
|
69 |
+ ->end() |
|
70 |
+ ->end() |
|
43 | 71 |
->end() |
44 | 72 |
; |
45 | 73 |
|
... | ... |
@@ -19,7 +19,7 @@ class Configuration implements ConfigurationInterface |
19 | 19 |
{ |
20 | 20 |
public function getConfigTreeBuilder(): TreeBuilder |
21 | 21 |
{ |
22 |
- $treeBuilder = new TreeBuilder('shopware_api'); |
|
22 |
+ $treeBuilder = new TreeBuilder('vonrotenberg_shopware_api'); |
|
23 | 23 |
$treeBuilder |
24 | 24 |
->getRootNode() |
25 | 25 |
->children() |
... | ... |
@@ -28,12 +28,15 @@ class Configuration implements ConfigurationInterface |
28 | 28 |
->children() |
29 | 29 |
->scalarNode('client_id') |
30 | 30 |
->info('Your Shopware client ID.') |
31 |
+ ->defaultValue('') |
|
31 | 32 |
->end() |
32 |
- ->scalarNode('client_id') |
|
33 |
+ ->scalarNode('client_secret') |
|
33 | 34 |
->info('Your Shopware client secret.') |
35 |
+ ->defaultValue('') |
|
34 | 36 |
->end() |
35 | 37 |
->scalarNode('api_endpoint') |
36 | 38 |
->info('The endpoint URL of your Shopware installation.') |
39 |
+ ->defaultValue('') |
|
37 | 40 |
->end() |
38 | 41 |
->end() |
39 | 42 |
->end() |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,45 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+declare(strict_types=1); |
|
4 |
+ |
|
5 |
+/* |
|
6 |
+ * This file is part of vonRotenberg Shopware API Bundle. |
|
7 |
+ * |
|
8 |
+ * (c) vonRotenberg |
|
9 |
+ * |
|
10 |
+ * @license proprietary |
|
11 |
+ */ |
|
12 |
+ |
|
13 |
+namespace vonRotenberg\ShopwareApiBundle\DependencyInjection; |
|
14 |
+ |
|
15 |
+use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
|
16 |
+use Symfony\Component\Config\Definition\ConfigurationInterface; |
|
17 |
+ |
|
18 |
+class Configuration implements ConfigurationInterface |
|
19 |
+{ |
|
20 |
+ public function getConfigTreeBuilder(): TreeBuilder |
|
21 |
+ { |
|
22 |
+ $treeBuilder = new TreeBuilder('shopware_api'); |
|
23 |
+ $treeBuilder |
|
24 |
+ ->getRootNode() |
|
25 |
+ ->children() |
|
26 |
+ ->arrayNode('credentials') |
|
27 |
+ ->addDefaultsIfNotSet() |
|
28 |
+ ->children() |
|
29 |
+ ->scalarNode('client_id') |
|
30 |
+ ->info('Your Shopware client ID.') |
|
31 |
+ ->end() |
|
32 |
+ ->scalarNode('client_id') |
|
33 |
+ ->info('Your Shopware client secret.') |
|
34 |
+ ->end() |
|
35 |
+ ->scalarNode('api_endpoint') |
|
36 |
+ ->info('The endpoint URL of your Shopware installation.') |
|
37 |
+ ->end() |
|
38 |
+ ->end() |
|
39 |
+ ->end() |
|
40 |
+ ->end() |
|
41 |
+ ; |
|
42 |
+ |
|
43 |
+ return $treeBuilder; |
|
44 |
+ } |
|
45 |
+} |