From 22c171ab28a18dbf6e4fdb420a917dc97a411d61 Mon Sep 17 00:00:00 2001 From: Maarten Haine Date: Fri, 15 Nov 2024 13:22:26 +0000 Subject: [PATCH] added extra bijrijd shift aan cantus template --- .../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(); } }