events2
events2 copied to clipboard
PostProcessICalRowsForICalDownloadEvent
The Event PostProcessICalRowsForICalDownloadEvent
is not usable in Version 9.0.8
$this->eventDispatcher->dispatch(
new PostProcessICalRowsForICalDownloadEvent($iCalRowsForAnEvent, $day),
);
array_push($iCal, ...$iCalRowsForAnEvent);
When change the Eventsdata, the return value is not used.
$postProcessEvent = $this->eventDispatcher->dispatch(
new PostProcessICalRowsForICalDownloadEvent($iCalRowsForAnEvent, $day),
);
array_push($iCal, ...$postProcessEvent->getEvent());
Fixed this.
Patch:
diff --git a/vendor/jweiland/events2/Classes/Helper/ICalendarHelper.php b/vendor/jweiland/events2/Classes/Helper/ICalendarHelper.php
--- a/vendor/jweiland/events2/Classes/Helper/ICalendarHelper.php
+++ b/vendor/jweiland/events2/Classes/Helper/ICalendarHelper.php
@@ -90,11 +90,11 @@ class ICalendarHelper
$this->addEventDescription($iCalRowsForAnEvent, $day);
$this->addEventEnd($iCalRowsForAnEvent);
- $this->eventDispatcher->dispatch(
+ $postProcessEvent = $this->eventDispatcher->dispatch(
new PostProcessICalRowsForICalDownloadEvent($iCalRowsForAnEvent, $day),
);
- array_push($iCal, ...$iCalRowsForAnEvent);
+ array_push($iCal, ...$postProcessEvent->getEvent());
}
protected function addEventBegin(array &$event): void