]> Raphaƫl G. Git Repositories - userbundle/blobdiff - DependencyInjection/Configuration.php
Add rapsys_user translate, locales and languages config keys
[userbundle] / DependencyInjection / Configuration.php
index 63ba75f5c9cc4966bf6dce917c211b781b2a3028..81ec927c74113e6c03003765d3fa3997c3109cc3 100644 (file)
@@ -51,6 +51,11 @@ class Configuration implements ConfigurationInterface {
                                        'context' => []
                                ]
                        ],
+                       'translate' => [],
+                       'locales' => '%kernel.translator.fallbacks%',
+                       'languages' => [
+                               'en' => 'English'
+                       ],
                        'contact' => [
                                'name' => 'John Doe',
                                'mail' => 'contact@example.com'
@@ -198,6 +203,17 @@ class Configuration implements ConfigurationInterface {
                                                        ->end()
                                                ->end()
                                        ->end()
+                                       ->arrayNode('translate')
+                                               ->treatNullLike(array())
+                                               ->defaultValue($defaults['translate'])
+                                               ->scalarPrototype()->end()
+                                       ->end()
+                                       ->scalarNode('locales')->cannotBeEmpty()->defaultValue($defaults['locales'])->end()
+                                       ->arrayNode('languages')
+                                               ->treatNullLike([])
+                                               ->defaultValue($defaults['languages'])
+                                               ->scalarPrototype()->end()
+                                       ->end()
                                        ->arrayNode('contact')
                                                ->addDefaultsIfNotSet()
                                                ->children()