diff --git a/cookbook/form/form_customization.rst b/cookbook/form/form_customization.rst
index fb36e4fc01f..358fab95a31 100644
--- a/cookbook/form/form_customization.rst
+++ b/cookbook/form/form_customization.rst
@@ -439,18 +439,15 @@ form is rendered.
# app/config/config.yml
twig:
- form:
- resources:
- - 'AcmeDemoBundle:Form:fields.html.twig'
+ form_themes:
+ - 'AcmeDemoBundle:Form:fields.html.twig'
# ...
.. code-block:: xml
-
- AcmeDemoBundle:Form:fields.html.twig
-
+ AcmeDemoBundle:Form:fields.html.twig
@@ -458,10 +455,8 @@ form is rendered.
// app/config/config.php
$container->loadFromExtension('twig', array(
- 'form' => array(
- 'resources' => array(
- 'AcmeDemoBundle:Form:fields.html.twig',
- ),
+ 'form_themes' => array(
+ 'AcmeDemoBundle:Form:fields.html.twig',
),
// ...
@@ -477,17 +472,14 @@ resource to use such a layout:
# app/config/config.yml
twig:
- form:
- resources: ['form_table_layout.html.twig']
+ form_themes: ['form_table_layout.html.twig']
# ...
.. code-block:: xml
-
- form_table_layout.html.twig
-
+ form_table_layout.html.twig
@@ -495,10 +487,8 @@ resource to use such a layout:
// app/config/config.php
$container->loadFromExtension('twig', array(
- 'form' => array(
- 'resources' => array(
- 'form_table_layout.html.twig',
- ),
+ 'form_themes' => array(
+ 'form_table_layout.html.twig',
),
// ...
diff --git a/reference/configuration/twig.rst b/reference/configuration/twig.rst
index cdb3de3bd00..cd121710277 100644
--- a/reference/configuration/twig.rst
+++ b/reference/configuration/twig.rst
@@ -10,14 +10,13 @@ TwigBundle Configuration ("twig")
twig:
exception_controller: twig.controller.exception:showAction
- form:
- resources:
+ form_themes:
- # Default:
- - form_div_layout.html.twig
+ # Default:
+ - form_div_layout.html.twig
- # Example:
- - MyBundle::form.html.twig
+ # Example:
+ - MyBundle::form.html.twig
globals:
# Examples:
@@ -54,9 +53,8 @@ TwigBundle Configuration ("twig")
http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/doctrine/twig-1.0.xsd">
-
- MyBundle::form.html.twig
-
+ form_div_layout.html.twig
+ MyBundle::form.html.twig
3.14
@@ -65,10 +63,9 @@ TwigBundle Configuration ("twig")
.. code-block:: php
$container->loadFromExtension('twig', array(
- 'form' => array(
- 'resources' => array(
- 'MyBundle::form.html.twig',
- )
+ 'form_themes' => array(
+ 'form_div_layout.html.twig', // Default
+ 'MyBundle::form.html.twig',
),
'globals' => array(
'foo' => '@bar',
@@ -83,6 +80,12 @@ TwigBundle Configuration ("twig")
'strict_variables' => false,
));
+.. caution::
+
+ The ``twig.form`` (```` tag for xml) configuration key
+ has been deprecated and will be removed in 3.0. Instead, use the ``twig.form_themes``
+ option.
+
Configuration
-------------