[Config] Take advantage of the new PrototypedArrayNode API in the core bundles
This commit is contained in:
parent
cba2c332ad
commit
675e5eb6e0
|
@ -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){
|
||||
|
|
|
@ -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); })
|
||||
|
|
Reference in New Issue