From 3f9926aab17f79f5bd7ac38a0d3502b5e8a85bbd Mon Sep 17 00:00:00 2001 From: Maarten <104211647+MaartenHaine@users.noreply.github.com> Date: Sun, 24 Nov 2024 21:18:35 +0100 Subject: [PATCH] Update CalendarController.php added bijrijd shift to template cantus --- .../Controller/Admin/CalendarController.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/CalendarBundle/Controller/Admin/CalendarController.php b/module/CalendarBundle/Controller/Admin/CalendarController.php index 27fc1feb57..8ddbe7e5ae 100644 --- a/module/CalendarBundle/Controller/Admin/CalendarController.php +++ b/module/CalendarBundle/Controller/Admin/CalendarController.php @@ -555,6 +555,16 @@ private function addShiftsByEvent(Event $event) $shiftForm->getHydrator()->hydrate($data) ); + $data['name'] = 'Bijrijden'; + $data['description'] = 'Chille in de kar. Locatie van de loods is: Tervuursevest 238. '; + $data['nb_volunteers_min'] = 1; + $data['start_date'] = $endDate . ' 1:00'; + $data['end_date'] = $endDate . ' 2:00'; + + $this->getEntityManager()->persist( + $shiftForm->getHydrator()->hydrate($data) + ); + $this->getEntityManager()->flush(); } }