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