@@ -12,26 +12,26 @@ objects from the database.
1212+-------------+------------------------------------------------------------------+
1313| Rendered as | can be various tags (see :ref: `forms-reference-choice-tags `) |
1414+-------------+------------------------------------------------------------------+
15- | Options | - `class `_ |
16- | | - `choice_label `_ |
17- | | - `query_builder `_ |
15+ | Options | - `choice_label `_ |
16+ | | - `class `_ |
1817| | - `em `_ |
18+ | | - `query_builder `_ |
1919+-------------+------------------------------------------------------------------+
2020| Overridden | - `choices `_ |
2121| options | - `data_class `_ |
2222+-------------+------------------------------------------------------------------+
2323| Inherited | from the :doc: `choice </reference/forms/types/choice >` type: |
2424| options | |
25- | | - `choice_value `_ |
26- | | - `choice_name `_ |
2725| | - `choice_attr `_ |
28- | | - `placeholder `_ |
26+ | | - `choice_name `_ |
2927| | - `choice_translation_domain `_ |
30- | | - `translation_domain `_ |
28+ | | - `choice_value `_ |
3129| | - `expanded `_ |
30+ | | - `group_by `_ |
3231| | - `multiple `_ |
32+ | | - `placeholder `_ |
3333| | - `preferred_choices `_ |
34- | | - `group_by `_ |
34+ | | - `translation_domain `_ |
3535| | |
3636| | from the :doc: `form </reference/forms/types/form >` type: |
3737| | |
@@ -108,15 +108,6 @@ then you can supply the ``choices`` option directly::
108108Field Options
109109-------------
110110
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-
120111choice_label
121112~~~~~~~~~~~~
122113
@@ -161,16 +152,14 @@ more detais, see the main :ref:`choice_label <reference-form-choice-label>` docu
161152 'choice_label' => 'translations[en].name',
162153 ));
163154
164- query_builder
165- ~~~~~~~~~~~~~
155+ class
156+ ~~~~~
166157
167- **type **: ``Doctrine\ORM\QueryBuilder `` or a Closure
158+ **type **: ``string `` ** required **
168159
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).
174163
175164em
176165~~
180169If specified, this entity manager will be used to load the choices
181170instead of the ``default `` entity manager.
182171
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+
183183Overridden Options
184184------------------
185185
@@ -206,20 +206,18 @@ Inherited Options
206206These options inherit from the :doc: `choice </reference/forms/types/choice >`
207207type:
208208
209- .. include :: /reference/forms/types/options/choice_value.rst.inc
210-
211- .. include :: /reference/forms/types/options/choice_name.rst.inc
212-
213209.. include :: /reference/forms/types/options/choice_attr.rst.inc
214210
215- .. include :: /reference/forms/types/options/placeholder .rst.inc
211+ .. include :: /reference/forms/types/options/choice_name .rst.inc
216212
217213.. include :: /reference/forms/types/options/choice_translation_domain.rst.inc
218214
219- .. include :: /reference/forms/types/options/choice_type_translation_domain .rst.inc
215+ .. include :: /reference/forms/types/options/choice_value .rst.inc
220216
221217.. include :: /reference/forms/types/options/expanded.rst.inc
222218
219+ .. include :: /reference/forms/types/options/group_by.rst.inc
220+
223221.. include :: /reference/forms/types/options/multiple.rst.inc
224222
225223.. note ::
@@ -230,7 +228,7 @@ type:
230228 is a complete example in the cookbook article
231229 :doc: `/cookbook/form/form_collections `.
232230
233- .. include :: /reference/forms/types/options/group_by .rst.inc
231+ .. include :: /reference/forms/types/options/placeholder .rst.inc
234232
235233.. include :: /reference/forms/types/options/preferred_choices.rst.inc
236234
@@ -239,6 +237,8 @@ type:
239237 This option expects an array of entity objects, unlike the ``choice ``
240238 field that requires an array of keys.
241239
240+ .. include :: /reference/forms/types/options/choice_type_translation_domain.rst.inc
241+
242242These options inherit from the :doc: `form </reference/forms/types/form >`
243243type:
244244
0 commit comments