1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace ProjetNormandie\ArticleBundle\DependencyInjection; |
||
6 | |||
7 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; |
||
8 | use Symfony\Component\Config\Definition\ConfigurationInterface; |
||
9 | |||
10 | class Configuration implements ConfigurationInterface |
||
11 | { |
||
12 | public function getConfigTreeBuilder(): TreeBuilder |
||
13 | { |
||
14 | $treeBuilder = new TreeBuilder('projet_normandie_article'); |
||
15 | $rootNode = $treeBuilder->getRootNode(); |
||
16 | |||
17 | $rootNode |
||
18 | ->children() |
||
19 | ->scalarNode('default_locale') |
||
20 | ->defaultValue('en') |
||
21 | ->info('Default locale for fallback translations') |
||
22 | ->end() |
||
23 | ->arrayNode('supported_locales') |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
24 | ->defaultValue(['en', 'fr']) |
||
25 | ->prototype('scalar')->end() |
||
26 | ->info('List of supported locales for translations') |
||
27 | ->end() |
||
28 | ->end(); |
||
29 | |||
30 | return $treeBuilder; |
||
31 | } |
||
32 | } |
||
33 |