We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5194403 commit 704302cCopy full SHA for 704302c
reference/forms/types/options/data_class.rst.inc
@@ -0,0 +1,11 @@
1
+data_class
2
+~~~~~~~~~~
3
+
4
+**type**: ``string``
5
6
+This option is used to set the appropriate data mapper to be used by the form, so you can use it for any form field type which requires an object.
7
8
+ $builder->add('media', 'sonata_media_type', array(
9
+ 'data_class' => 'Acme\DemoBundle\Entity\Media',
10
+ ));
11
0 commit comments