@@ -12,15 +12,15 @@ relationships (e.g. a product from where you can manage many related product
12
12
photos).
13
13
14
14
+-------------+-----------------------------------------------------------------------------+
15
- | Rendered as | depends on the `entry_type `_ option |
15
+ | Rendered as | depends on the `type `_ option |
16
16
+-------------+-----------------------------------------------------------------------------+
17
17
| Options | - `allow_add `_ |
18
18
| | - `allow_delete `_ |
19
19
| | - `delete_empty `_ |
20
- | | - `entry_options `_ |
21
- | | - `entry_type `_ |
20
+ | | - `options `_ |
22
21
| | - `prototype `_ |
23
22
| | - `prototype_name `_ |
23
+ | | - `type `_ |
24
24
+-------------+-----------------------------------------------------------------------------+
25
25
| Inherited | - `by_reference `_ |
26
26
| options | - `empty_data `_ |
@@ -276,8 +276,8 @@ form you have to set this option to true. However, existing collection entries
276
276
will only be deleted if you have the allow_delete _ option enabled. Otherwise
277
277
the empty values will be kept.
278
278
279
- entry_options
280
- ~~~~~~~~~~~~~
279
+ options
280
+ ~~~~~~~
281
281
282
282
**type **: ``array `` **default **: ``array() ``
283
283
@@ -292,28 +292,17 @@ type::
292
292
// ...
293
293
294
294
$builder->add('favorite_cities', CollectionType::class, array(
295
- 'entry_type' => ChoiceType::class ,
295
+ 'entry_type' => 'choice ,
296
296
'entry_options' => array(
297
297
'choices' => array(
298
- 'Nashville ' => 'nashville ',
299
- 'Paris ' => 'paris ',
300
- 'Berlin ' => 'berlin ',
301
- 'London ' => 'london ',
298
+ 'nashville ' => 'Nashville ',
299
+ 'paris ' => 'Paris ',
300
+ 'berlin ' => 'Berlin ',
301
+ 'london ' => 'London ',
302
302
),
303
303
),
304
304
));
305
305
306
- entry_type
307
- ~~~~~~~~~~
308
-
309
- **type **: ``string `` or :class: `Symfony\\ Component\\ Form\\ FormTypeInterface ` **required **
310
-
311
- This is the field type for each item in this collection (e.g. ``TextType ``,
312
- ``ChoiceType ``, etc). For example, if you have an array of email addresses,
313
- you'd use the :doc: `EmailType </reference/forms/types/email >`. If you want
314
- to embed a collection of some other form, create a new instance of your
315
- form type and pass it as this option.
316
-
317
306
prototype
318
307
~~~~~~~~~
319
308
@@ -362,6 +351,17 @@ If you have several collections in your form, or worse, nested collections
362
351
you may want to change the placeholder so that unrelated placeholders are
363
352
not replaced with the same value.
364
353
354
+ type
355
+ ~~~~
356
+
357
+ **type **: ``string `` or :class: `Symfony\\ Component\\ Form\\ FormTypeInterface ` **required **
358
+
359
+ This is the field type for each item in this collection (e.g. ``TextType ``,
360
+ ``ChoiceType ``, etc). For example, if you have an array of email addresses,
361
+ you'd use the :doc: `EmailType </reference/forms/types/email >`. If you want
362
+ to embed a collection of some other form, create a new instance of your
363
+ form type and pass it as this option.
364
+
365
365
Inherited Options
366
366
-----------------
367
367
0 commit comments