@@ -377,6 +377,8 @@ sport like this::
377377 // src/Form/Type/SportMeetupType.php
378378 namespace App\Form\Type;
379379
380+ use App\Entity\Position;
381+ use App\Entity\Sport;
380382 use Symfony\Bridge\Doctrine\Form\Type\EntityType;
381383 use Symfony\Component\Form\AbstractType;
382384 use Symfony\Component\Form\FormBuilderInterface;
@@ -390,7 +392,7 @@ sport like this::
390392 {
391393 $builder
392394 ->add('sport', EntityType::class, [
393- 'class' => 'App\Entity\ Sport' ,
395+ 'class' => Sport::class ,
394396 'placeholder' => '',
395397 ])
396398 ;
@@ -407,7 +409,7 @@ sport like this::
407409 $positions = null === $sport ? [] : $sport->getAvailablePositions();
408410
409411 $form->add('position', EntityType::class, [
410- 'class' => 'App\Entity\ Position' ,
412+ 'class' => Position::class ,
411413 'placeholder' => '',
412414 'choices' => $positions,
413415 ]);
@@ -443,6 +445,7 @@ The type would now look like::
443445 // src/Form/Type/SportMeetupType.php
444446 namespace App\Form\Type;
445447
448+ use App\Entity\Position;
446449 use App\Entity\Sport;
447450 use Symfony\Bridge\Doctrine\Form\Type\EntityType;
448451 use Symfony\Component\Form\FormInterface;
@@ -454,7 +457,7 @@ The type would now look like::
454457 {
455458 $builder
456459 ->add('sport', EntityType::class, [
457- 'class' => 'App\Entity\ Sport' ,
460+ 'class' => Sport::class ,
458461 'placeholder' => '',
459462 ])
460463 ;
@@ -463,7 +466,7 @@ The type would now look like::
463466 $positions = null === $sport ? [] : $sport->getAvailablePositions();
464467
465468 $form->add('position', EntityType::class, [
466- 'class' => 'App\Entity\ Position' ,
469+ 'class' => Position::class ,
467470 'placeholder' => '',
468471 'choices' => $positions,
469472 ]);
0 commit comments