Hi guys,

I'm integrating sabredav calendar backend in my web app. I have 
successfully implemented auth and principal backends.
Now, i'm stuck at the getCalendarObject[s] methods. These methods return 
array of data and that part is ok, but I can't seem to figure out what am i 
suppose to fill calendardata attribute with?
what structure is expected by the caldav server?
Am I suppose to use vobject and pass the serialized data from vobject, or i 
should use array and let caldav backend format that array using vobject?

I tried returning something like below sample, but when I click to download 
.ics, it is not formated like proper ical vevent.

Do you have any advice how should I procede with implementing these to 
methods and formating calendardata atribute? Or any other advice based on 
the below mentioned code sample?




$calendarData = new stdClass();
$calendarData->SUMMARY = $event->getEvent()->getDisplayName();
$calendarData->DTSTART = $event->getStartDatetime();
$calendarData->DTEND = $event->getEndDatetime();
$calendarData->DTSTAMP = $event->getStartDatetime();
$calendarData->UID = $event->getUserEmail();

// OR

$calendarData = array(
         'SUMMARY' => $event->getEvent()->getDisplayName(),
         'DTSTART' => $event->getStartDatetime(),
         'DTEND' => $event->getEndDatetime(),
         'DTSTAMP' => $event->getStartDatetime(),
         'UID' => $event->getUserEmail(),
);

return [
    'id'           => $event->getObjectId(),
    'uri'          => $event->getObjectId() . '.ics',
    'lastmodified' => null,
    'etag'         => '"' . md5(print_r($event, true)) . '"',
    'calendarid'   => $calendarId,
    'size'         => strlen(print_r($event, true)),
    //'calendardata' => 'SUMMARY:' . $event->getEvent()->getDisplayName() . 
',' . 'DTSTART:' . $event->getStartDatetime(),
    'calendardata' => $calendarData,
    'component'    => 'vevent',
];



10x in advance,
Best

-- 
You received this message because you are subscribed to the Google Groups 
"SabreDAV Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sabredav-discuss/ba1549be-d128-46b0-964e-8ed8e5e85b0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to