[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')
|
->fixXmlConfig('resource')
|
||||||
->children()
|
->children()
|
||||||
->arrayNode('resources')
|
->arrayNode('resources')
|
||||||
->defaultValue(array('FrameworkBundle:Form'))
|
->addDefaultChildrenWhenNoneSet()
|
||||||
->prototype('scalar')->end()
|
->prototype('scalar')->defaultValue('FrameworkBundle:Form')->end()
|
||||||
->validate()
|
->validate()
|
||||||
->ifTrue(function($v) {return !in_array('FrameworkBundle:Form', $v); })
|
->ifTrue(function($v) {return !in_array('FrameworkBundle:Form', $v); })
|
||||||
->then(function($v){
|
->then(function($v){
|
||||||
|
@ -54,8 +54,8 @@ class Configuration implements ConfigurationInterface
|
|||||||
->fixXmlConfig('resource')
|
->fixXmlConfig('resource')
|
||||||
->children()
|
->children()
|
||||||
->arrayNode('resources')
|
->arrayNode('resources')
|
||||||
->defaultValue(array('form_div_layout.html.twig'))
|
->addDefaultChildrenWhenNoneSet()
|
||||||
->prototype('scalar')->end()
|
->prototype('scalar')->defaultValue('form_div_layout.html.twig')->end()
|
||||||
->setExample(array('MyBundle::form.html.twig'))
|
->setExample(array('MyBundle::form.html.twig'))
|
||||||
->validate()
|
->validate()
|
||||||
->ifTrue(function($v) { return !in_array('form_div_layout.html.twig', $v); })
|
->ifTrue(function($v) { return !in_array('form_div_layout.html.twig', $v); })
|
||||||
|
Reference in New Issue
Block a user