Conditions | 1 |
Paths | 1 |
Total Lines | 37 |
Code Lines | 33 |
Lines | 0 |
Ratio | 0 % |
Tests | 34 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
25 | 7 | public function getConfigTreeBuilder() |
|
26 | { |
||
27 | 7 | $treeBuilder = new TreeBuilder(); |
|
28 | 7 | $rootNode = $treeBuilder->root('ongr_translations'); |
|
29 | |||
30 | $rootNode |
||
31 | 7 | ->addDefaultsIfNotSet() |
|
32 | 7 | ->children() |
|
33 | 7 | ->arrayNode('repository') |
|
34 | 7 | ->info('Repository used for connecting with elasticsearch client.') |
|
35 | 7 | ->children() |
|
36 | 7 | ->scalarNode('translation')->isRequired() |
|
37 | 7 | ->end() |
|
38 | 7 | ->scalarNode('history')->isRequired() |
|
39 | 7 | ->end() |
|
40 | 7 | ->end() |
|
41 | 7 | ->end() |
|
42 | 7 | ->scalarNode('list_size') |
|
43 | 7 | ->info('Maximum amount of translations displayed in the list') |
|
44 | 7 | ->defaultValue(1000) |
|
45 | 7 | ->end() |
|
46 | 7 | ->arrayNode('locales') |
|
47 | 7 | ->requiresAtleastOneElement() |
|
48 | 7 | ->info('Locales to manage (e.g. "en", "de", "en_eur").') |
|
49 | 7 | ->prototype('scalar')->end() |
|
50 | 7 | ->end() |
|
51 | 7 | ->arrayNode('bundles') |
|
52 | 7 | ->info('Bundles to scan for translations.') |
|
53 | 7 | ->prototype('scalar') |
|
54 | 7 | ->defaultValue([]) |
|
55 | 7 | ->end() |
|
56 | 7 | ->end() |
|
57 | 7 | ->end() |
|
58 | 7 | ->end(); |
|
59 | 7 | ||
60 | 7 | return $treeBuilder; |
|
61 | 7 | } |
|
62 | } |
||
63 |