X-Git-Url: https://git.rapsys.eu/userbundle/blobdiff_plain/19248f049f8bfa40780456677b483f23a4f20ee2..3fd3f39c4d28a213495141dd8463816a0b1c719b:/DependencyInjection/Configuration.php?ds=sidebyside diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index a8c0324..ece6c29 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -20,11 +20,15 @@ class Configuration implements ConfigurationInterface { //The bundle default values $defaults = [ - 'class' => [ + 'class' => [ 'group' => 'Rapsys\\UserBundle\\Entity\\Group', - 'title' => 'Rapsys\\UserBundle\\Entity\\Title', + 'civility' => 'Rapsys\\UserBundle\\Entity\\Civility', 'user' => 'Rapsys\\UserBundle\\Entity\\User' ], + 'default' => [ + 'civility' => 'Mister', + 'group' => [ 'User' ] + ], 'route' => [ 'index' => [ 'name' => 'rapsys_user_index', @@ -47,6 +51,11 @@ class Configuration implements ConfigurationInterface { 'context' => [] ] ], + 'translate' => [], + 'locales' => '%kernel.translator.fallbacks%', + 'languages' => [ + 'en' => 'English' + ], 'contact' => [ 'name' => 'John Doe', 'mail' => 'contact@example.com' @@ -119,10 +128,21 @@ 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('civility')->cannotBeEmpty()->defaultValue($defaults['default']['civility'])->end() + ->arrayNode('group') + ->treatNullLike(array()) + ->defaultValue($defaults['default']['group']) + ->scalarPrototype()->end() + ->end() + ->end() + ->end() ->arrayNode('route') ->addDefaultsIfNotSet() ->children() @@ -183,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()