//The bundle default values
$defaults = [
- 'class' => [
+ 'class' => [
'group' => 'Rapsys\\UserBundle\\Entity\\Group',
'title' => 'Rapsys\\UserBundle\\Entity\\Title',
'user' => 'Rapsys\\UserBundle\\Entity\\User'
],
+ 'default' => [
+ 'title' => 'Mister',
+ 'group' => [ 'User' ]
+ ],
'route' => [
'index' => [
'name' => 'rapsys_user_index',
->scalarNode('user')->cannotBeEmpty()->defaultValue($defaults['class']['user'])->end()
->end()
->end()
+ ->arrayNode('default')
+ ->addDefaultsIfNotSet()
+ ->children()
+ ->scalarNode('title')->cannotBeEmpty()->defaultValue($defaults['default']['title'])->end()
+ ->arrayNode('group')
+ ->treatNullLike(array())
+ ->defaultValue($defaults['default']['group'])
+ ->scalarPrototype()->end()
+ ->end()
+ ->end()
+ ->end()
->arrayNode('route')
->addDefaultsIfNotSet()
->children()