[Config] Take advantage of the new PrototypedArrayNode API in the core bundles

This commit is contained in:
Victor Berchet 2012-02-20 11:20:39 +01:00
parent cba2c332ad
commit 675e5eb6e0
2 changed files with 4 additions and 4 deletions

View File

@ -217,8 +217,8 @@ class Configuration implements ConfigurationInterface
->fixXmlConfig('resource')
->children()
->arrayNode('resources')
->defaultValue(array('FrameworkBundle:Form'))
->prototype('scalar')->end()
->addDefaultChildrenWhenNoneSet()
->prototype('scalar')->defaultValue('FrameworkBundle:Form')->end()
->validate()
->ifTrue(function($v) {return !in_array('FrameworkBundle:Form', $v); })
->then(function($v){

View File

@ -54,8 +54,8 @@ class Configuration implements ConfigurationInterface
->fixXmlConfig('resource')
->children()
->arrayNode('resources')
->defaultValue(array('form_div_layout.html.twig'))
->prototype('scalar')->end()
->addDefaultChildrenWhenNoneSet()
->prototype('scalar')->defaultValue('form_div_layout.html.twig')->end()
->setExample(array('MyBundle::form.html.twig'))
->validate()
->ifTrue(function($v) { return !in_array('form_div_layout.html.twig', $v); })