Skip to content

Commit f5f0fb6

Browse files
committed
minor #11183 Update entity.rst (juuuuuu)
This PR was submitted for the 4.2 branch but it was merged into the 3.4 branch instead (closes #11183). Discussion ---------- Update entity.rst Highlight the `name` property and use FQCN instead of string. Commits ------- 1995aa1 Update entity.rst
2 parents 4b5ffd4 + 1995aa1 commit f5f0fb6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

reference/forms/types/entity.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,14 @@ more details, see the main :ref:`choice_label <reference-form-choice-label>` doc
163163
:doc:`PropertyAccessor component </components/property_access>`
164164

165165
For example, if the translations property is actually an associative
166-
array of objects, each with a name property, then you could do this::
166+
array of objects, each with a ``name`` property, then you could do this::
167167

168+
use MyBundle\Entity\Genre;
168169
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
169170
// ...
170171

171172
$builder->add('genre', EntityType::class, [
172-
'class' => 'MyBundle:Genre',
173+
'class' => Genre::class,
173174
'choice_label' => 'translations[en].name',
174175
]);
175176

0 commit comments

Comments
 (0)