Skip to content

Commit c8a44ae

Browse files
committed
Documented choice variables
1 parent 98e828f commit c8a44ae

File tree

4 files changed

+38
-16
lines changed

4 files changed

+38
-16
lines changed

reference/forms/types/checkbox.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ Field Options
4848

4949
.. include:: /reference/forms/types/options/value.rst.inc
5050

51-
Variables
52-
---------
53-
54-
.. include:: /reference/forms/types/variables/checked.rst.inc
55-
5651
Overridden options
5752
------------------
5853

@@ -82,3 +77,12 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
8277
.. include:: /reference/forms/types/options/error_mapping.rst.inc
8378

8479
.. include:: /reference/forms/types/options/mapped.rst.inc
80+
81+
Form Variables
82+
--------------
83+
84+
======== ============ ============================================
85+
Variable Type Usage
86+
======== ============ ============================================
87+
checked ``Boolean`` Whether or not the current input is checked.
88+
======== ============ ============================================

reference/forms/types/choice.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,23 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
156156
.. include:: /reference/forms/types/options/inherit_data.rst.inc
157157

158158
.. include:: /reference/forms/types/options/by_reference.rst.inc
159+
160+
Field Variables
161+
---------------
162+
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 value
176+
and returns if the choice is selected or not
177+
empty_value_in_choices ``Boolean`` Whether the empty value is in the choice list
178+
====================== ============ ===========================================================

reference/forms/types/radio.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ If you want to have a Boolean field, use :doc:`checkbox </reference/forms/types/
3434
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\RadioType` |
3535
+-------------+---------------------------------------------------------------------+
3636

37-
Variables
38-
---------
39-
40-
.. include:: /reference/forms/types/variables/checked.rst.inc
41-
4237
Inherited Options
4338
-----------------
4439

@@ -68,3 +63,12 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
6863
.. include:: /reference/forms/types/options/error_mapping.rst.inc
6964

7065
.. include:: /reference/forms/types/options/mapped.rst.inc
66+
67+
Form Variables
68+
--------------
69+
70+
======== ============ ============================================
71+
Variable Type Usage
72+
======== ============ ============================================
73+
checked ``Boolean`` Whether or not the current input is checked.
74+
======== ============ ============================================

reference/forms/types/variables/checked.rst.inc

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)