@@ -83,8 +83,8 @@ What are Form Themes?
83
83
---------------------
84
84
85
85
Symfony uses form fragments - a small piece of a template that renders just
86
- one part of a form - to render every part of a form - - field labels, errors,
87
- ``input `` text fields, ``select `` tags, etc
86
+ one part of a form - to render each part of a form - field labels, errors,
87
+ ``input `` text fields, ``select `` tags, etc.
88
88
89
89
The fragments are defined as blocks in Twig and as template files in PHP.
90
90
@@ -100,7 +100,7 @@ to render every part of a form.
100
100
In the next section you will learn how to customize a theme by overriding
101
101
some or all of its fragments.
102
102
103
- For example, when the widget of a ``integer `` type field is rendered, an ``input ``
103
+ For example, when the widget of an ``integer `` type field is rendered, an ``input ``
104
104
``number `` field is generated
105
105
106
106
.. configuration-block ::
@@ -119,15 +119,15 @@ renders:
119
119
120
120
<input type =" number" id =" form_age" name =" form[age]" required =" required" value =" 33" />
121
121
122
- Internally, Symfony uses the ``integer_widget `` fragment to render the field.
122
+ Internally, Symfony uses the ``integer_widget `` fragment to render the field.
123
123
This is because the field type is ``integer `` and you're rendering its ``widget ``
124
124
(as opposed to its ``label `` or ``errors ``).
125
125
126
126
In Twig that would default to the block ``integer_widget `` from the `form_div_layout.html.twig `_
127
127
template.
128
128
129
- In PHP it would rather be the ``integer_widget.html.php `` file located in `` FrameworkBundle/Resources/views/Form ``
130
- folder.
129
+ In PHP it would rather be the ``integer_widget.html.php `` file located in
130
+ the `` FrameworkBundle/Resources/views/Form `` folder.
131
131
132
132
The default implementation of the ``integer_widget `` fragment looks like this:
133
133
@@ -610,7 +610,7 @@ which part of the field is being customized. For example:
610
610
<!-- src/Acme/DemoBundle/Resources/views/Form/_product_name_widget.html.php -->
611
611
612
612
<div class="text_widget">
613
- echo $view['form']->renderBlock ('form_widget_simple') ?>
613
+ echo $view['form']->block ('form_widget_simple') ?>
614
614
</div>
615
615
616
616
Here, the ``_product_name_widget `` fragment defines the template to use for the
0 commit comments