public function formatItems($items, $format, $parameters = null) { $events = array(); if ($format == self::FORMAT_EVENT) { foreach ($items as $item) { $item['item_source'] = App::validateItemSource($item['item_source'], App::SHAREEVENTPREFIX); if (!Object::checkSharedEvent($item['item_source'])) { $event = Object::find($item['item_source']); $event['summary'] = $item['item_target']; $event['item_source'] = (int) $item['item_source']; $event['privat'] = false; $event['shared'] = false; $event['isalarm'] = $event['isalarm']; $event['permissions'] = $item['permissions']; //$event['userid'] = $event['userid']; $event['orgevent'] = false; $events[] = $event; } } } return $events; }