From f62f1891d8fe3aa7c9dabc0747bd3d3833da25fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 7 Jun 2024 13:07:25 +0200 Subject: [PATCH] Fix displaying calendar: reproduce same getAtDate method as Activity --- src/Bundle/ChillCalendarBundle/Entity/Calendar.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Bundle/ChillCalendarBundle/Entity/Calendar.php b/src/Bundle/ChillCalendarBundle/Entity/Calendar.php index 32308a50c..5962ae4d1 100644 --- a/src/Bundle/ChillCalendarBundle/Entity/Calendar.php +++ b/src/Bundle/ChillCalendarBundle/Entity/Calendar.php @@ -524,6 +524,16 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente return $this->startDate; } + /** + * get the date of the calendar. + * + * Useful for showing the date of the calendar event, required by twig in some places. + */ + public function getDate(): ?\DateTimeImmutable + { + return $this->getStartDate(); + } + public function getStatus(): ?string { return $this->status;