File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -110,11 +110,12 @@ choice_label
110110 The ``choice_label `` option was introduced in Symfony 2.7. Prior to Symfony
111111 2.7, it was called ``property `` (which has the same functionality).
112112
113- **type **: ``string ``
113+ **type **: ``string `` or a Closure
114114
115115This is the property that should be used for displaying the entities
116116as text in the HTML element. If left blank, the entity object will be
117- cast into a string and so must have a ``__toString() `` method.
117+ cast into a string and so must have a ``__toString() `` method. If using Closure, it should
118+ take a single argument, which is the entity and return the label of this entity.
118119
119120.. note ::
120121
@@ -152,7 +153,7 @@ instead of the default entity manager.
152153group_by
153154~~~~~~~~
154155
155- **type **: ``string ``
156+ **type **: ``string `` or a Closure
156157
157158This is a property path (e.g. ``author.name ``) used to organize the
158159available choices in groups. It only works when rendered as a select tag
You can’t perform that action at this time.
0 commit comments