10000 Create data_class.rst.inc #2362 by dpcat237 · Pull Request #3334 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Create data_class.rst.inc #2362 #3334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Create data_class.rst.inc #2362
Create data_class documentation.
  • Loading branch information
dpcat237 committed Dec 14, 2013
commit a75b30a200ed9f7b4ca15f4cd19ac4926b7ca3eb
11 changes: 11 additions & 0 deletions reference/forms/types/options/data_class.rst.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
data_class
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should add a versionadded directive before this line:

.. versionadded:: 2.4
    The ``data_class`` option was introduced in Symfony 2.4.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this isn't correct, right? The data_class option has always existed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~~~~~~~~~~

**type**: ``string``

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should wrap your lines after the first word that crosses the 72th character


$builder->add('media', 'sonata_media_type', array(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if using a 3th party type is what we want

'data_class' => 'Acme\DemoBundle\Entity\Media',
));

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this empty line

0