]> Raphaƫl G. Git Repositories - userbundle/blobdiff - DependencyInjection/Configuration.php
Rename title in civility
[userbundle] / DependencyInjection / Configuration.php
index 63ba75f5c9cc4966bf6dce917c211b781b2a3028..ece6c297dea6e09b9cd941b8c287f7da07e6da6e 100644 (file)
@@ -22,11 +22,11 @@ class Configuration implements ConfigurationInterface {
                $defaults = [
                        'class' => [
                                'group' => 'Rapsys\\UserBundle\\Entity\\Group',
-                               'title' => 'Rapsys\\UserBundle\\Entity\\Title',
+                               'civility' => 'Rapsys\\UserBundle\\Entity\\Civility',
                                'user' => 'Rapsys\\UserBundle\\Entity\\User'
                        ],
                        'default' => [
-                               'title' => 'Mister',
+                               'civility' => 'Mister',
                                'group' => [ 'User' ]
                        ],
                        'route' => [
@@ -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'
@@ -123,14 +128,14 @@ class Configuration implements ConfigurationInterface {
                                                ->addDefaultsIfNotSet()
                                                ->children()
                                                        ->scalarNode('group')->cannotBeEmpty()->defaultValue($defaults['class']['group'])->end()
-                                                       ->scalarNode('title')->cannotBeEmpty()->defaultValue($defaults['class']['title'])->end()
+                                                       ->scalarNode('civility')->cannotBeEmpty()->defaultValue($defaults['class']['civility'])->end()
                                                        ->scalarNode('user')->cannotBeEmpty()->defaultValue($defaults['class']['user'])->end()
                                                ->end()
                                        ->end()
                                        ->arrayNode('default')
                                                ->addDefaultsIfNotSet()
                                                ->children()
-                                                       ->scalarNode('title')->cannotBeEmpty()->defaultValue($defaults['default']['title'])->end()
+                                                       ->scalarNode('civility')->cannotBeEmpty()->defaultValue($defaults['default']['civility'])->end()
                                                        ->arrayNode('group')
                                                                ->treatNullLike(array())
                                                                ->defaultValue($defaults['default']['group'])
@@ -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()