/** * Convert from Kolab_Format to internal representation */ private function _to_rcube_event($record) { $record['id'] = $record['uid']; $record['calendar'] = $this->id; return kolab_driver::to_rcube_event($record); }
/** * Helper method to modify some event properties */ private function _mod_event($event) { // set classes according to PARTSTAT $event = kolab_driver::add_partstat_class($event, $this->partstats); if (strpos($event['className'], 'fc-invitation-') !== false) { $event['calendar'] = $this->id; } return $event; }
/** * Convert from Kolab_Format to internal representation */ private function _to_rcube_event($record) { $record['id'] = $record['uid']; $record['calendar'] = $this->id; $record['links'] = $this->get_links($record['uid']); if ($this->get_namespace() == 'other') { $record['className'] = 'fc-event-ns-other'; $record = kolab_driver::add_partstat_class($record, array('NEEDS-ACTION', 'DECLINED'), $this->get_owner()); } return kolab_driver::to_rcube_event($record); }
/** * Convert from Kolab_Format to internal representation */ private function _to_driver_event($record, $noinst = false) { $record['calendar'] = $this->id; $record['links'] = $this->get_links($record['uid']); if ($this->get_namespace() == 'other') { $record['className'] = 'fc-event-ns-other'; $record = kolab_driver::add_partstat_class($record, array('NEEDS-ACTION', 'DECLINED'), $this->get_owner()); } // add instance identifier to first occurrence (master event) $recurrence_id_format = libcalendaring::recurrence_id_format($record); if (!$noinst && $record['recurrence'] && !$record['recurrence_id'] && !$record['_instance']) { $record['_instance'] = $record['start']->format($recurrence_id_format); } else { if (is_a($record['recurrence_date'], 'DateTime')) { $record['_instance'] = $record['recurrence_date']->format($recurrence_id_format); } } // clean up exception data if ($record['recurrence'] && is_array($record['recurrence']['EXCEPTIONS'])) { array_walk($record['recurrence']['EXCEPTIONS'], function (&$exception) { unset($exception['_mailbox'], $exception['_msguid'], $exception['_formatobj'], $exception['_attachments']); }); } return $record; }