@@ -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: `choice </reference/forms/types/choice >` type: |
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: `form </reference/forms/types/form >` type: |
37
37
| | |
@@ -108,15 +108,6 @@ then you can supply the ``choices`` option directly::
108
108
Field Options
109
109
-------------
110
110
111
- class
112
- ~~~~~
113
-
114
- **type **: ``string `` **required **
115
-
116
- The class of your entity (e.g. ``AcmeStoreBundle:Category ``). This can be
117
- a fully-qualified class name (e.g. ``Acme\StoreBundle\Entity\Category ``)
118
- or the short alias name (as shown prior).
119
-
120
111
choice_label
121
112
~~~~~~~~~~~~
122
113
@@ -161,16 +152,14 @@ more detais, see the main :ref:`choice_label <reference-form-choice-label>` docu
161
152
'choice_label' => 'translations[en].name',
162
153
));
163
154
164
- query_builder
165
- ~~~~~~~~~~~~~
155
+ class
156
+ ~~~~~
166
157
167
- **type **: ``Doctrine\ORM\QueryBuilder `` or a Closure
158
+ **type **: ``string `` ** required **
168
159
169
- If specified, this is used to query the subset of options (and their
170
- order) that should be used for the field. The value of this option can
171
- either be a ``QueryBuilder `` object or a Closure. If using a Closure,
172
- it should take a single argument, which is the ``EntityRepository `` of
173
- the entity and return an instance of ``QueryBuilder ``.
160
+ The class of your entity (e.g. ``AcmeStoreBundle:Category ``). This can be
161
+ a fully-qualified class name (e.g. ``Acme\StoreBundle\Entity\Category ``)
162
+ or the short alias name (as shown prior).
174
163
175
164
em
176
165
~~
180
169
If specified, this entity manager will be used to load the choices
181
170
instead of the ``default `` entity manager.
182
171
172
+ query_builder
173
+ ~~~~~~~~~~~~~
174
+
175
+ **type **: ``Doctrine\ORM\QueryBuilder `` or a Closure
176
+
177
+ If specified, this is used to query the subset of options (and their
178
+ order) that should be used for the field. The value of this option can
179
+ either be a ``QueryBuilder `` object or a Closure. If using a Closure,
180
+ it should take a single argument, which is the ``EntityRepository `` of
181
+ the entity and return an instance of ``QueryBuilder ``.
182
+
183
183
Overridden Options
184
184
------------------
185
185
@@ -206,20 +206,18 @@ Inherited Options
206
206
These options inherit from the :doc: `choice </reference/forms/types/choice >`
207
207
type:
208
208
209
- .. include :: /reference/forms/types/options/choice_value.rst.inc
210
-
211
- .. include :: /reference/forms/types/options/choice_name.rst.inc
212
-
213
209
.. include :: /reference/forms/types/options/choice_attr.rst.inc
214
210
215
- .. include :: /reference/forms/types/options/placeholder .rst.inc
211
+ .. include :: /reference/forms/types/options/choice_name .rst.inc
216
212
217
213
.. include :: /reference/forms/types/options/choice_translation_domain.rst.inc
218
214
219
- .. include :: /reference/forms/types/options/choice_type_translation_domain .rst.inc
215
+ .. include :: /reference/forms/types/options/choice_value .rst.inc
220
216
221
217
.. include :: /reference/forms/types/options/expanded.rst.inc
222
218
219
+ .. include :: /reference/forms/types/options/group_by.rst.inc
220
+
223
221
.. include :: /reference/forms/types/options/multiple.rst.inc
224
222
225
223
.. note ::
@@ -230,7 +228,7 @@ type:
230
228
is a complete example in the cookbook article
231
229
:doc: `/cookbook/form/form_collections `.
232
230
233
- .. include :: /reference/forms/types/options/group_by .rst.inc
231
+ .. include :: /reference/forms/types/options/placeholder .rst.inc
234
232
235
233
.. include :: /reference/forms/types/options/preferred_choices.rst.inc
236
234
@@ -239,6 +237,8 @@ type:
239
237
This option expects an array of entity objects, unlike the ``choice ``
240
238
field that requires an array of keys.
241
239
240
+ .. include :: /reference/forms/types/options/choice_type_translation_domain.rst.inc
241
+
242
242
These options inherit from the :doc: `form </reference/forms/types/form >`
243
243
type:
244
244
0 commit comments