replace old method of getting translator with injection of translatorInterface

This commit is contained in:
2023-10-26 15:20:19 +02:00
parent cdfb084fe4
commit c6deb21606
7 changed files with 47 additions and 64 deletions

View File

@@ -118,7 +118,7 @@ class EventController extends AbstractController
$this->addFlash(
'success',
$this->get('translator')
$this->translator
->trans('The event has been sucessfully removed')
);
@@ -249,7 +249,7 @@ class EventController extends AbstractController
$em->persist($entity);
$em->flush();
$this->addFlash('success', $this->get('translator')
$this->addFlash('success', $this->translator
->trans('The event was created'));
return $this->redirectToRoute('chill_event__event_show', ['event_id' => $entity->getId()]);
@@ -364,7 +364,7 @@ class EventController extends AbstractController
if ($editForm->isValid()) {
$em->flush();
$this->addFlash('success', $this->get('translator')
$this->addFlash('success', $this->translator
->trans('The event was updated'));
return $this->redirectToRoute('chill_event__event_edit', ['event_id' => $event_id]);