diff --git a/reference/forms/types/options/data_class.rst.inc b/reference/forms/types/options/data_class.rst.inc index 3636dbf13d6..47be20a162e 100644 --- a/reference/forms/types/options/data_class.rst.inc +++ b/reference/forms/types/options/data_class.rst.inc @@ -9,6 +9,8 @@ data_class 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. +.. code-block:: php + $builder->add('media', 'sonata_media_type', array( 'data_class' => 'Acme\DemoBundle\Entity\Media', ));