Skip to content

Commit 398d23f

Browse files
committed
Applied comments by @xabbuh
1 parent 97d216d commit 398d23f

File tree

3 files changed

+33
-26
lines changed

3 files changed

+33
-26
lines changed

reference/forms/twig_reference.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ object:
319319
+------------------------+-------------------------------------------------------------------------------------+
320320
| Variable | Usage |
321321
+========================+=====================================================================================+
322-
| ``form`` | The current FormView instance |
322+
| ``form`` | The current ``FormView`` instance |
323323
+------------------------+-------------------------------------------------------------------------------------+
324324
| ``id`` | The ``id`` HTML attribute to be rendered |
325325
+------------------------+-------------------------------------------------------------------------------------+
@@ -331,8 +331,8 @@ object:
331331
| ``errors`` | An array of any errors attached to *this* specific field |
332332
| | (e.g. ``form.title.errors``). |
333333
| | Note that you can't use ``form.errors`` to determine if a form is valid, |
334-
| | since this only returns "global" errors: some individual fields may have errors |
335-
| | Instead, use the ``valid`` option |
334+
| | since this only returns "global" errors: some individual fields may have errors. |
335+
| | Instead, use the ``valid`` option. |
336336
+------------------------+-------------------------------------------------------------------------------------+
337337
| ``valid`` | Returns ``true`` or ``false`` depending on whether the whole form is valid |
338338
+------------------------+-------------------------------------------------------------------------------------+
@@ -365,13 +365,13 @@ object:
365365
+------------------------+-------------------------------------------------------------------------------------+
366366
| ``translation_domain`` | The domain of the translations for this form |
367367
+------------------------+-------------------------------------------------------------------------------------+
368-
| ``cache_key`` | An unique key which is used for caching |
368+
| ``cache_key`` | A unique key which is used for caching |
369369
+------------------------+-------------------------------------------------------------------------------------+
370370
| ``data`` | The normalized data of the type |
371371
+------------------------+-------------------------------------------------------------------------------------+
372-
| ``method`` | The method of the current form (POST, GET, etc) |
372+
| ``method`` | The method of the current form (POST, GET, etc.) |
373373
+------------------------+-------------------------------------------------------------------------------------+
374-
| ``action`` | The action of the current form (POST, GET, etc) |
374+
| ``action`` | The action of the current form |
375375
+------------------------+-------------------------------------------------------------------------------------+
376376

377377
.. _`form_div_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

reference/forms/types/choice.rst

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -160,22 +160,29 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
160160
Field Variables
161161
---------------
162162

163-
====================== ============ ================================================================
164-
Variable Type Usage
165-
====================== ============ ================================================================
166-
multiple ``Boolean`` The value of the `multiple`_ option.
167-
expanded ``Boolean`` The value of the `expanded`_ option.
168-
preferred_choices ``array`` A nested array containing the ``ChoiceView`` objects of
169-
choices which should be presented to the user with priority.
170-
choices ``array`` A nested array containing the ``ChoiceView`` objects of
171-
the remaining choices.
172-
separator ``string`` The seperator to use between choice groups.
173-
empty_value ``mixed`` The empty value if not already in the list, otherwise
174-
``null``.
175-
is_selected ``callable`` A callable which takes a ``ChoiceView`` and the selected value(s)
176-
and returns whether the choice is in the selected value(s).
177-
empty_value_in_choices ``Boolean`` Whether the empty value is in the choice list.
178-
====================== ============ ================================================================
163+
+------------------------+--------------+-------------------------------------------------------------------+
164+
| Variable | Type | Usage |
165+
+========================+==============+===================================================================+
166+
| multiple | ``Boolean`` | The value of the `multiple`_ option. |
167+
+------------------------+--------------+-------------------------------------------------------------------+
168+
| expanded | ``Boolean`` | The value of the `expanded`_ option. |
169+
+------------------------+--------------+-------------------------------------------------------------------+
170+
| preferred_choices | ``array`` | A nested array containing the ``ChoiceView`` objects of |
171+
| | | choices which should be presented to the user with priority. |
172+
+------------------------+--------------+-------------------------------------------------------------------+
173+
| choices | ``array`` | A nested array containing the ``ChoiceView`` objects of |
174+
| | | the remaining choices. |
175+
+------------------------+--------------+-------------------------------------------------------------------+
176+
| separator | ``string`` | The seperator to use between choice groups. |
177+
+------------------------+--------------+-------------------------------------------------------------------+
178+
| empty_value | ``mixed`` | The empty value if not already in the list, otherwise |
179+
| | | ``null``. |
180+
+------------------------+--------------+-------------------------------------------------------------------+
181+
| is_selected | ``callable`` | A callable which takes a ``ChoiceView`` and the selected value(s) |
182+
| | | and returns whether the choice is in the selected value(s). |
183+
+------------------------+--------------+-------------------------------------------------------------------+
184+
| empty_value_in_choices | ``Boolean`` | Whether the empty value is in the choice list. |
185+
+------------------------+--------------+-------------------------------------------------------------------+
179186

180187
.. tip::
181188

reference/forms/types/file.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
104104
Form Variables
105105
--------------
106106

107-
======== ========== ==========================================================================
107+
======== ========== ==============================================================================
108108
Variable Type Usage
109-
======== ========== ==========================================================================
110-
type ``string`` The type variable is set to ``file``, in order to render like a file input
111-
======== ========== ==========================================================================
109+
======== ========== ==============================================================================
110+
type ``string`` The type variable is set to ``file``, in order to render as a file input field
111+
======== ========== ==============================================================================

0 commit comments

Comments
 (0)