Skip to content

Commit acff5b0

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: (26 commits) moving options below basic usage changing a few orders of sections - mostly to move overridden after the main options Rewrite note a bit fix capitalization [Cookbook][Assetic] complete a sentence Fixed a typo Reordered two overridden options Added missing types in overridden options Fixed the order of the different options Fixed the order of the different options Improved the explanation about the "compoun" option Fixer minor issues Fixed errors noticed by Wouter Removed a duplicated "trim" option in the "password" type Removed again a duplicated option explanation Removed a duplicated option explanation in "file" type Extracted the common "data_class" option explanation for data-related types Documented the overridden options of "date" type Documented overridden options for "file" type Documented the overridden options of the "password" type ...
2 parents a45a393 + 21c7666 commit acff5b0

23 files changed

+155
-35
lines changed

cookbook/assetic/php.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ formatter used by the filter to produce the compiled CSS file. Using the
116116
compressed formatter will minimize the the resulting file, regardless of whether
117117
the original files are regular CSS files or SCSS files.
118118

119-
Next, your Twig template to add the ``{% stylesheets %}`` tag defined by Assetic:
119+
Next, update your Twig template to add the ``{% stylesheets %}`` tag defined
120+
by Assetic:
120121

121122
.. code-block:: html+jinja
122123

cookbook/form/form_customization.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ fragment needed to render every part of a form:
114114
but the CSS classes applied are the ones used to display the forms horizontally
115115
(i.e. the label and the widget in the same row).
116116

117+
.. caution::
118+
119+
When you use the Bootstrap form themes and render the fields manually,
120+
calling ``form_label()`` for a checkbox/radio field doesn't show anything.
121+
Due to Bootstrap internals, the label is already shown by ``form_widget()``.
122+
117123
In the next section you will learn how to customize a theme by overriding
118124
some or all of its fragments.
119125

cookbook/security/form_login_setup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ firewall matches *all* URLs, including ``/login_check``). If ``/login_check``
456456
doesn't match any firewall, you'll receive a ``Unable to find the controller
457457
for path "/login_check"`` exception.
458458

459-
4. Multiple Firewalls Don't Share the same Security Context
459+
4. Multiple Firewalls Don't Share the Same Security Context
460460
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
461461

462462
If you're using multiple firewalls and you authenticate against one firewall,

reference/forms/types/country.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ you should just use the ``choice`` type directly.
2323
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
2424
+-------------+-----------------------------------------------------------------------+
2525
| Overridden | - `choices`_ |
26-
| Options | |
26+
| options | |
2727
+-------------+-----------------------------------------------------------------------+
2828
| Inherited | from the :doc:`choice </reference/forms/types/choice>` type |
2929
| options | |

reference/forms/types/currency.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ you should just use the ``choice`` type directly.
1717
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
1818
+-------------+------------------------------------------------------------------------+
1919
| Overridden | - `choices`_ |
20-
| Options | |
20+
| options | |
2121
+-------------+------------------------------------------------------------------------+
2222
| Inherited | from the :doc:`choice </reference/forms/types/choice>` type |
2323
| options | |

reference/forms/types/date.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ day and year) or three select boxes (see the `widget`_ option).
3030
| | - `widget`_ |
3131
| | - `years`_ |
3232
+----------------------+-----------------------------------------------------------------------------+
33-
| Overridden Options | - `by_reference`_ |
33+
| Overridden options | - `by_reference`_ |
34+
| | - `compound`_ |
35+
| | - `data_class`_ |
3436
| | - `error_bubbling`_ |
3537
+----------------------+-----------------------------------------------------------------------------+
3638
| Inherited | - `data`_ |
@@ -132,6 +134,10 @@ by_reference
132134

133135
The ``DateTime`` classes are treated as immutable objects.
134136

137+
.. include:: /reference/forms/types/options/compound_type.rst.inc
138+
139+
.. include:: /reference/forms/types/options/data_class_date.rst.inc
140+
135141
error_bubbling
136142
~~~~~~~~~~~~~~
137143

reference/forms/types/datetime.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ the data can be a ``DateTime`` object, a string, a timestamp or an array.
3434
| | - `with_seconds`_ |
3535
| | - `years`_ |
3636
+----------------------+-----------------------------------------------------------------------------+
37+
| Overridden options | - `by_reference`_ |
38+
| | - `compound`_ |
39+
| | - `data_class`_ |
40+
| | - `error_bubbling`_ |
41+
+----------------------+-----------------------------------------------------------------------------+
3742
| Inherited | - `data`_ |
3843
| options | - `disabled`_ |
3944
| | - `inherit_data`_ |
@@ -134,6 +139,25 @@ with the `date_widget`_ and `time_widget`_ options.
134139

135140
.. include:: /reference/forms/types/options/years.rst.inc
136141

142+
Overridden Options
143+
------------------
144+
145+
by_reference
146+
~~~~~~~~~~~~
147+
148+
**default**: ``false``
149+
150+
The ``DateTime`` classes are treated as immutable objects.
151+
152+
.. include:: /reference/forms/types/options/compound_type.rst.inc
153+
154+
.. include:: /reference/forms/types/options/data_class_date.rst.inc
155+
156+
error_bubbling
157+
~~~~~~~~~~~~~~
158+
159+
**default**: ``false``
160+
137161
Inherited Options
138162
-----------------
139163

reference/forms/types/entity.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ objects from the database.
1919
| | - `property`_ |
2020
| | - `query_builder`_ |
2121
+-------------+------------------------------------------------------------------+
22-
| Overriden | - `choice_list`_ |
22+
| Overridden | - `choice_list`_ |
2323
| options | - `choices`_ |
2424
+-------------+------------------------------------------------------------------+
2525
| Inherited | from the :doc:`choice </reference/forms/types/choice>` type: |

reference/forms/types/file.rst

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ The ``file`` type represents a file input in your form.
1111
+-------------+---------------------------------------------------------------------+
1212
| Options | - `multiple`_ |
1313
+-------------+---------------------------------------------------------------------+
14+
| Overridden | - `compound`_ |
15+
| options | - `data_class`_ |
16+
| | - `empty_data`_ |
17+
+-------------+---------------------------------------------------------------------+
1418
| Inherited | - `disabled`_ |
15-
| options | - `empty_data`_ |
16-
| | - `error_bubbling`_ |
19+
| options | - `error_bubbling`_ |
1720
| | - `error_mapping`_ |
1821
| | - `label`_ |
1922
| | - `label_attr`_ |
@@ -86,6 +89,26 @@ multiple
8689

8790
When set to true, the user will be able to upload multiple files at the same time.
8891

92+
Overridden Options
93+
------------------
94+
95+
.. include:: /reference/forms/types/options/compound_type.rst.inc
96+
97+
data_class
98+
~~~~~~~~~~
99+
100+
**type**: ``string`` **default**: :class:`Symfony\\Component\\HttpFoundation\\File\\File`
101+
102+
This option sets the appropriate file-related data mapper to be used by the type.
103+
104+
empty_data
105+
~~~~~~~~~~
106+
107+
**type**: ``mixed`` **default**: ``null``
108+
109+
This option determines what value the field will return when the submitted
110+
value is empty.
111+
89112
Inherited Options
90113
-----------------
91114

@@ -94,14 +117,6 @@ type:
94117

95118
.. include:: /reference/forms/types/options/disabled.rst.inc
96119

97-
.. include:: /reference/forms/types/options/empty_data.rst.inc
98-
:end-before: DEFAULT_PLACEHOLDER
99-
100-
The default value is ``null``.
101-
102-
.. include:: /reference/forms/types/options/empty_data.rst.inc
103-
:start-after: DEFAULT_PLACEHOLDER
104-
105120
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
106121

107122
.. include:: /reference/forms/types/options/error_mapping.rst.inc

reference/forms/types/hidden.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ The hidden type represents a hidden input field.
99
+-------------+----------------------------------------------------------------------+
1010
| Rendered as | ``input`` ``hidden`` field |
1111
+-------------+----------------------------------------------------------------------+
12-
| Overriden | - `error_bubbling`_ |
13-
| options | - `required`_ |
12+
| Overriden | - `compound`_ |
13+
| options | - `error_bubbling`_ |
14+
| | - `required`_ |
1415
+-------------+----------------------------------------------------------------------+
1516
| Inherited | - `data`_ |
1617
| options | - `error_mapping`_ |
@@ -25,6 +26,8 @@ The hidden type represents a hidden input field.
2526
Overridden Options
2627
------------------
2728

29+
.. include:: /reference/forms/types/options/compound_type.rst.inc
30+
2831
error_bubbling
2932
~~~~~~~~~~~~~~
3033

0 commit comments

Comments
 (0)