Conditions | 1 |
Paths | 1 |
Total Lines | 49 |
Code Lines | 38 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function getConfigTreeBuilder() |
||
20 | { |
||
21 | $treeBuilder = new TreeBuilder(); |
||
22 | $rootNode = $treeBuilder->root('alcalyn_payplug'); |
||
23 | |||
24 | $rootNode |
||
25 | ->children() |
||
26 | |||
27 | // Payplug account parameters |
||
28 | ->arrayNode('account') |
||
29 | ->children() |
||
30 | ->scalarNode('url')->end() |
||
31 | ->scalarNode('amount_min')->end() |
||
32 | ->scalarNode('amount_max')->end() |
||
33 | ->arrayNode('currencies') |
||
34 | ->prototype('scalar')->end() |
||
35 | ->end() |
||
36 | ->scalarNode('payplugPublicKey')->end() |
||
37 | ->scalarNode('yourPrivateKey')->end() |
||
38 | ->end() |
||
39 | ->end() |
||
40 | |||
41 | // Sandbox parameters |
||
42 | ->arrayNode('sandbox') |
||
43 | ->addDefaultsIfNotSet() |
||
44 | ->children() |
||
45 | ->booleanNode('enabled') |
||
46 | ->defaultFalse() |
||
47 | ->end() |
||
48 | ->arrayNode('account') |
||
49 | ->children() |
||
50 | ->scalarNode('url')->defaultNull()->end() |
||
51 | ->scalarNode('yourPrivateKey')->defaultNull()->end() |
||
52 | ->end() |
||
53 | ->end() |
||
54 | ->end() |
||
55 | ->end() |
||
56 | |||
57 | // Entities classes to use |
||
58 | ->arrayNode('class') |
||
59 | ->addDefaultsIfNotSet() |
||
60 | ->children() |
||
61 | ->scalarNode('ipn')->defaultValue(IPN::getClassName())->end() |
||
62 | ->end() |
||
63 | ->end() |
||
64 | ; |
||
65 | |||
66 | return $treeBuilder; |
||
67 | } |
||
68 | } |
||
69 |