Skip to content

Commit 704302c

Browse files
dpcat237weaverryan
authored andcommitted
Create data_class.rst.inc #2362
Create data_class documentation.
1 parent 5194403 commit 704302c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)