Skip to content

Commit b67b0f6

Browse files
committed
fix 'data_class' option in EntityType
1 parent 8d72a1f commit b67b0f6

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

reference/forms/types/entity.rst

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ objects from the database.
1313
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
1414
+-------------+------------------------------------------------------------------+
1515
| Options | - `class`_ |
16-
| | - `data_class`_ |
1716
| | - `em`_ |
1817
| | - `group_by`_ |
1918
| | - `property`_ |
2019
| | - `query_builder`_ |
2120
+-------------+------------------------------------------------------------------+
2221
| Overridden | - `choice_list`_ |
2322
| options | - `choices`_ |
23+
| | - `data_class`_ |
2424
+-------------+------------------------------------------------------------------+
2525
| Inherited | from the :doc:`choice </reference/forms/types/choice>` type: |
2626
| options | |
@@ -117,15 +117,15 @@ or the short alias name (as shown prior).
117117
em
118118
~~
119119

120-
**type**: ``string`` **default**: the default entity manager
120+
**type**: ``string`` **default**: the default entity manager class
121121

122122
If specified, the specified entity manager will be used to load the choices
123123
instead of the default entity manager.
124124

125125
group_by
126126
~~~~~~~~
127127

128-
**type**: ``string``
128+
**type**: ``string`` **default** ``null``
129129

130130
This is a property path (e.g. ``author.name``) used to organize the
131131
available choices in groups. It only works when rendered as a select tag
@@ -136,7 +136,7 @@ the select tag, without a surrounding optgroup.
136136
property
137137
~~~~~~~~
138138

139-
**type**: ``string``
139+
**type**: ``string`` **default**: ``null``
140140

141141
This is the property that should be used for displaying the entities
142142
as text in the HTML element. If left blank, the entity object will be
@@ -175,9 +175,9 @@ choice_list
175175

176176
**default**: :class:`Symfony\\Bridge\\Doctrine\\Form\\ChoiceList\\EntityChoiceList`
177177

178-
The purpose of the ``entity`` type is to create and configure this ``EntityChoiceList``
179-
for you, by using all of the above options. If you need to override this
180-
option, you may just consider using the :doc:`/reference/forms/types/choice`
178+
The purpose of the ``entity`` type is to create and configure this
179+
``EntityChoiceList`` for you, by using all of the above options. If you need
180+
to override this option, you may just consider using the :doc:`/reference/forms/types/choice`
181181
directly.
182182

183183
choices
@@ -189,6 +189,14 @@ Instead of allowing the `class`_ and `query_builder`_ options to fetch the
189189
entities to include for you, you can pass the ``choices`` option directly.
190190
See :ref:`reference-forms-entity-choices`.
191191

192+
data_class
193+
~~~~~~~~~~
194+
195+
**type**: ``string`` **default**: ``null``
196+
197+
This option is not used in favor of the ``class`` option which is required
198+
to query the entities.
199+
192200
Inherited Options
193201
-----------------
194202

0 commit comments

Comments
 (0)