Skip to content

Commit 28cae48

Browse files
committed
[Form] Mention that choice labels support TranslatableInterface objects
1 parent 77804f9 commit 28cae48

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

reference/forms/types/options/choice_label.rst.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ more control::
2929
},
3030
]);
3131

32+
.. versionadded:: 6.2
33+
34+
Starting from Symfony 6.2, you can use any object that implements
35+
:class:`Symfony\\Contracts\\Translation\\TranslatableInterface` as the value
36+
of the choice label.
37+
3238
This method is called for *each* choice, passing you the ``$choice`` and
3339
``$key`` from the choices array (additional ``$value`` is related to `choice_value`_).
3440
This will give you:

0 commit comments

Comments
 (0)