Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions reference/forms/types/options/choice_label.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ more control::
},
]);

.. versionadded:: 6.2

Starting from Symfony 6.2, you can use any object that implements
:class:`Symfony\\Contracts\\Translation\\TranslatableInterface` as the value
of the choice label.

This method is called for *each* choice, passing you the ``$choice`` and
``$key`` from the choices array (additional ``$value`` is related to `choice_value`_).
This will give you:
Expand Down