@@ -12,26 +12,26 @@ objects from the database.
12
12
+-------------+------------------------------------------------------------------+
13
13
| Rendered as | can be various tags (see :ref: `forms-reference-choice-tags `) |
14
14
+-------------+------------------------------------------------------------------+
15
- | Options | - `class `_ |
16
- | | - `choice_label `_ |
17
- | | - `query_builder `_ |
15
+ | Options | - `choice_label `_ |
16
+ | | - `class `_ |
18
17
| | - `em `_ |
18
+ | | - `query_builder `_ |
19
19
+-------------+------------------------------------------------------------------+
20
20
| Overridden | - `choices `_ |
21
21
| options | - `data_class `_ |
22
22
+-------------+------------------------------------------------------------------+
23
23
| Inherited | from the :doc: `ChoiceType </reference/forms/types/choice >`: |
24
24
| options | |
25
- | | - `choice_value `_ |
26
- | | - `choice_name `_ |
27
25
| | - `choice_attr `_ |
28
- | | - `placeholder `_ |
26
+ | | - `choice_name `_ |
29
27
| | - `choice_translation_domain `_ |
30
- | | - `translation_domain `_ |
28
+ | | - `choice_value `_ |
31
29
| | - `expanded `_ |
30
+ | | - `group_by `_ |
32
31
| | - `multiple `_ |
32
+ | | - `placeholder `_ |
33
33
| | - `preferred_choices `_ |
34
- | | - `group_by `_ |
34
+ | | - `translation_domain `_ |
35
35
| | |
36
36
| | from the :doc: `FormType </reference/forms/types/form >`: |
37
37
| | |
@@ -118,15 +118,6 @@ then you can supply the ``choices`` option directly::
118
118
Field Options
119
119
-------------
120
120
121
- class
122
- ~~~~~
123
-
124
- **type **: ``string `` **required **
125
-
126
- The class of your entity (e.g. ``AppBundle:Category ``). This can be
127
- a fully-qualified class name (e.g. ``AppBundle\Entity\Category ``)
128
- or the short alias name (as shown prior).
129
-
130
121
choice_label
131
122
~~~~~~~~~~~~
132
123
@@ -180,16 +171,14 @@ more detais, see the main :ref:`choice_label <reference-form-choice-label>` docu
180
171
'choice_label' => 'translations[en].name',
181
172
));
182
173
183
- query_builder
184
- ~~~~~~~~~~~~~
174
+ class
175
+ ~~~~~
185
176
186
- **type **: ``Doctrine\ORM\QueryBuilder `` or a Closure
177
+ **type **: ``string `` ** required **
187
178
188
- If specified, this is used to query the subset of options (and their
189
- order) that should be used for the field. The value of this option can
190
- either be a ``QueryBuilder `` object or a Closure. If using a Closure,
191
- it should take a single argument, which is the ``EntityRepository `` of
192
- the entity and return an instance of ``QueryBuilder ``.
179
+ The class of your entity (e.g. ``AppBundle:Category ``). This can be
180
+ a fully-qualified class name (e.g. ``AppBundle\Entity\Category ``)
181
+ or the short alias name (as shown prior).
193
182
194
183
em
195
184
~~
199
188
If specified, this entity manager will be used to load the choices
200
189
instead of the ``default `` entity manager.
201
190
191
+ query_builder
192
+ ~~~~~~~~~~~~~
193
+
194
+ **type **: ``Doctrine\ORM\QueryBuilder `` or a Closure
195
+
196
+ If specified, this is used to query the subset of options (and their
197
+ order) that should be used for the field. The value of this option can
198
+ either be a ``QueryBuilder `` object or a Closure. If using a Closure,
199
+ it should take a single argument, which is the ``EntityRepository `` of
200
+ the entity and return an instance of ``QueryBuilder ``.
201
+
202
202
Overridden Options
203
203
------------------
204
204
@@ -224,20 +224,18 @@ Inherited Options
224
224
225
225
These options inherit from the :doc: `ChoiceType </reference/forms/types/choice >`:
226
226
227
- .. include :: /reference/forms/types/options/choice_value.rst.inc
228
-
229
- .. include :: /reference/forms/types/options/choice_name.rst.inc
230
-
231
227
.. include :: /reference/forms/types/options/choice_attr.rst.inc
232
228
233
- .. include :: /reference/forms/types/options/placeholder .rst.inc
229
+ .. include :: /reference/forms/types/options/choice_name .rst.inc
234
230
235
231
.. include :: /reference/forms/types/options/choice_translation_domain.rst.inc
236
232
237
- .. include :: /reference/forms/types/options/choice_type_translation_domain .rst.inc
233
+ .. include :: /reference/forms/types/options/choice_value .rst.inc
238
234
239
235
.. include :: /reference/forms/types/options/expanded.rst.inc
240
236
237
+ .. include :: /reference/forms/types/options/group_by.rst.inc
238
+
241
239
.. include :: /reference/forms/types/options/multiple.rst.inc
242
240
243
241
.. note ::
@@ -248,7 +246,7 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`
248
246
is a complete example in the cookbook article
249
247
:doc: `/cookbook/form/form_collections `.
250
248
251
- .. include :: /reference/forms/types/options/group_by .rst.inc
249
+ .. include :: /reference/forms/types/options/placeholder .rst.inc
252
250
253
251
.. include :: /reference/forms/types/options/preferred_choices.rst.inc
254
252
@@ -257,7 +255,10 @@ These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`
257
255
This option expects an array of entity objects (that's actually the same as with
258
256
the ``ChoiceType `` field, whichs requires an array of the preferred "values").
259
257
260
- These options inherit from the :doc: `FormType </reference/forms/types/form >`:
258
+ .. include :: /reference/forms/types/options/choice_type_translation_domain.rst.inc
259
+
260
+ These options inherit from the :doc: `form </reference/forms/types/form >`
261
+ type:
261
262
262
263
.. include :: /reference/forms/types/options/data.rst.inc
263
264
0 commit comments