@@ 13-41 (lines=29) @@ | ||
10 | * |
|
11 | * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} |
|
12 | */ |
|
13 | class Configuration implements ConfigurationInterface |
|
14 | { |
|
15 | /** |
|
16 | * Generates the configuration tree builder. |
|
17 | * |
|
18 | * @return TreeBuilder The tree builder |
|
19 | */ |
|
20 | public function getConfigTreeBuilder() |
|
21 | { |
|
22 | $treeBuilder = new TreeBuilder('kunstmaan_form'); |
|
23 | if (method_exists($treeBuilder, 'getRootNode')) { |
|
24 | $rootNode = $treeBuilder->getRootNode(); |
|
25 | } else { |
|
26 | // BC layer for symfony/config 4.1 and older |
|
27 | $rootNode = $treeBuilder->root('kunstmaan_form'); |
|
28 | } |
|
29 | ||
30 | $rootNode |
|
31 | ->children() |
|
32 | ->booleanNode('deletable_formsubmissions')->defaultFalse()->end() |
|
33 | ->end() |
|
34 | ; |
|
35 | ||
36 | // Here you should define the parameters that are allowed to |
|
37 | // configure your bundle. See the documentation linked above for |
|
38 | // more information on that topic. |
|
39 | return $treeBuilder; |
|
40 | } |
|
41 | } |
|
42 |
@@ 13-39 (lines=27) @@ | ||
10 | * |
|
11 | * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} |
|
12 | */ |
|
13 | class Configuration implements ConfigurationInterface |
|
14 | { |
|
15 | /** |
|
16 | * {@inheritdoc} |
|
17 | */ |
|
18 | public function getConfigTreeBuilder() |
|
19 | { |
|
20 | $treeBuilder = new TreeBuilder('kunstmaan_seo'); |
|
21 | if (method_exists($treeBuilder, 'getRootNode')) { |
|
22 | $rootNode = $treeBuilder->getRootNode(); |
|
23 | } else { |
|
24 | // BC layer for symfony/config 4.1 and older |
|
25 | $rootNode = $treeBuilder->root('kunstmaan_seo'); |
|
26 | } |
|
27 | ||
28 | $rootNode |
|
29 | ->children() |
|
30 | ->scalarNode('request_cache') |
|
31 | ->defaultValue('cache.app') |
|
32 | ->info('Provide a psr-6 cache service to cache all external http calls for seo images.') |
|
33 | ->end() |
|
34 | ->end() |
|
35 | ; |
|
36 | ||
37 | return $treeBuilder; |
|
38 | } |
|
39 | } |
|
40 |