renamed Form Twig templates to be more explicit
This commit is contained in:
parent
1e992c299e
commit
a7974ff43c
@ -83,7 +83,7 @@ beta4 to beta5
|
||||
|
||||
After:
|
||||
|
||||
`div_layout.html.twig`
|
||||
`form_div_layout.html.twig`
|
||||
|
||||
* All settings regarding the cache warmers have been removed.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% use "div_layout.html.twig" %}
|
||||
{% use "form_div_layout.html.twig" %}
|
||||
|
||||
{% block field_row %}
|
||||
{% spaceless %}
|
@ -49,11 +49,11 @@ class Configuration implements ConfigurationInterface
|
||||
->children()
|
||||
->arrayNode('resources')
|
||||
->addDefaultsIfNotSet()
|
||||
->defaultValue(array('div_layout.html.twig'))
|
||||
->defaultValue(array('form_div_layout.html.twig'))
|
||||
->validate()
|
||||
->always()
|
||||
->then(function($v){
|
||||
return array_merge(array('div_layout.html.twig'), $v);
|
||||
return array_merge(array('form_div_layout.html.twig'), $v);
|
||||
})
|
||||
->end()
|
||||
->prototype('scalar')->end()
|
||||
|
@ -31,7 +31,7 @@ class TwigExtensionTest extends TestCase
|
||||
$this->compileContainer($container);
|
||||
|
||||
$this->assertEquals('Twig_Environment', $container->getParameter('twig.class'), '->load() loads the twig.xml file');
|
||||
$this->assertContains('div_layout.html.twig', $container->getParameter('twig.form.resources'), '->load() includes default template for form resources');
|
||||
$this->assertContains('form_div_layout.html.twig', $container->getParameter('twig.form.resources'), '->load() includes default template for form resources');
|
||||
|
||||
// Twig options
|
||||
$options = $container->getParameter('twig.options');
|
||||
@ -54,7 +54,7 @@ class TwigExtensionTest extends TestCase
|
||||
|
||||
// Form resources
|
||||
$resources = $container->getParameter('twig.form.resources');
|
||||
$this->assertContains('div_layout.html.twig', $resources, '->load() includes default template for form resources');
|
||||
$this->assertContains('form_div_layout.html.twig', $resources, '->load() includes default template for form resources');
|
||||
$this->assertContains('MyBundle::form.html.twig', $resources, '->load() merges new templates into form resources');
|
||||
|
||||
// Globals
|
||||
|
@ -37,7 +37,7 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
|
||||
));
|
||||
|
||||
$this->extension = new FormExtension(array(
|
||||
'div_layout.html.twig',
|
||||
'form_div_layout.html.twig',
|
||||
'custom_widgets.html.twig',
|
||||
));
|
||||
|
||||
|
@ -37,7 +37,7 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest
|
||||
));
|
||||
|
||||
$this->extension = new FormExtension(array(
|
||||
'table_layout.html.twig',
|
||||
'form_table_layout.html.twig',
|
||||
'custom_widgets.html.twig',
|
||||
));
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends 'div_layout.html.twig' %}
|
||||
{% extends 'form_div_layout.html.twig' %}
|
||||
|
||||
{% block field_widget %}
|
||||
{% spaceless %}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% use 'div_layout.html.twig' %}
|
||||
{% use 'form_div_layout.html.twig' %}
|
||||
|
||||
{% block field_widget %}
|
||||
{% spaceless %}
|
||||
|
Reference in New Issue
Block a user