Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 754da30

Browse filesBrowse files
committed
Added performance tip
1 parent 7d10315 commit 754da30
Copy full SHA for 754da30

File tree

Expand file treeCollapse file tree

1 file changed

+21
-16
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+21
-16
lines changed

‎reference/forms/types/choice.rst

Copy file name to clipboardExpand all lines: reference/forms/types/choice.rst
+21-16Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -160,19 +160,24 @@ 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 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-
====================== ============ ===========================================================
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+
====================== ============ ================================================================
179+
180+
.. tip::
181+
182+
It's significantly faster to use the :ref:`form-twig-selectedchoice` test
183+
instead when using Twig.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.