diff --git a/src/Bundle/ChillEventBundle/Controller/EventController.php b/src/Bundle/ChillEventBundle/Controller/EventController.php index d10349cf1..46f6f200d 100644 --- a/src/Bundle/ChillEventBundle/Controller/EventController.php +++ b/src/Bundle/ChillEventBundle/Controller/EventController.php @@ -42,7 +42,7 @@ use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\Security\Core\Security; use Symfony\Component\Serializer\Exception\ExceptionInterface; -use Symfony\Component\Serializer\SerializerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Contracts\Translation\TranslatorInterface; /** @@ -61,7 +61,7 @@ final class EventController extends AbstractController private readonly PaginatorFactory $paginator, private readonly Security $security, private readonly ManagerRegistry $managerRegistry, - private readonly SerializerInterface $serializer, + private readonly NormalizerInterface $normalizer, ) {} #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/delete', name: 'chill_event__event_delete', requirements: ['event_id' => '\d+'], methods: ['GET', 'POST', 'DELETE'])] @@ -106,7 +106,7 @@ final class EventController extends AbstractController } return $this->render('@ChillEvent/Event/confirm_delete.html.twig', [ - 'event_id' => $event->getId(), + 'id' => $event->getId(), 'delete_form' => $form->createView(), ]); } @@ -207,7 +207,7 @@ final class EventController extends AbstractController return $this->redirectToRoute('chill_event__event_show', ['id' => $entity->getId()]); } - $entity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']); + $entity_array = $this->normalizer->normalize($entity, 'json', ['groups' => 'read']); return $this->render('@ChillEvent/Event/new.html.twig', [ 'entity' => $entity,