minproperties = $GLOBALS["properties"]->getBusyTimeProperties(); } /** * Creates the notifiers for this module, * and register them to the Bus. */ #[Override] public function createNotifiers() { // Keep empty, the BusyTimeListModule doesn't need notifiers. } /** * Process calendar items to prepare them for being sent back to the client. * * @param array $calendaritems array of appointments retrieved from the mapi tablwe * @param object $store message store * @param mixed $entryid * @param int $start startdate of the interval * @param int $end enddate of the interval * * @return array $items processed items */ #[Override] public function processItems($calendaritems, $store, $entryid, $start, $end) { $items = []; foreach ($calendaritems as $calendaritem) { if (isset($calendaritem[$this->properties["recurring"]]) && $calendaritem[$this->properties["recurring"]]) { $recurrence = new Recurrence($store, $calendaritem); try { $recuritems = $recurrence->getItems($start, $end); } catch (RecurrenceException $re) { $subject = $calendaritem[$this->properties["subject"]] ?? ''; error_log(sprintf( "processItems (busytimelist) RecurrenceException (%d) for item '%s' - %s - %s", $re->getCode(), $subject, bin2hex($calendaritem[$this->properties["entryid"]]), bin2hex($calendaritem[$this->properties["recurring_data"]]) )); continue; } foreach ($recuritems as $recuritem) { $item = Conversion::mapMAPI2XML($this->minproperties, $recuritem); // only add it in response if its not removed by above function if (!empty($item)) { array_push($items, $item['props']); } } } else { $item = Conversion::mapMAPI2XML($this->minproperties, $calendaritem); // only add it in response if its not removed by above function if (!empty($item)) { array_push($items, $item['props']); } } } return $items; } }