Skip to content

Commit 2574794

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: Update entity.rst
2 parents 60142c5 + f5f0fb6 commit 2574794

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

reference/forms/types/entity.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,14 @@ more details, see the main :ref:`choice_label <reference-form-choice-label>` doc
172172
:doc:`PropertyAccessor component </components/property_access>`
173173

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

177+
use App\Entity\Genre;
177178
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
178179
// ...
179180

180181
$builder->add('genre', EntityType::class, [
181-
'class' => 'App\Entity\Genre',
182+
'class' => Genre::class,
182183
'choice_label' => 'translations[en].name',
183184
]);
184185

0 commit comments

Comments
 (0)