private function XCalFormatView::render_ical in Services 6.3
1 call to XCalFormatView::render_ical()
- XCalFormatView::render in servers/
rest_server/ formats/ XCalFormatView.inc
File
- servers/
rest_server/ formats/ XCalFormatView.inc, line 49 - This file will parse the xcal view for the rest server
Class
- XCalFormatView
- @file This file will parse the xcal view for the rest server
Code
private function render_ical() {
$out = "BEGIN:VCALENDAR\n";
$out .= "VERSION:2.0\n";
$out .= $this
->ical_value('PRODID:', $this
->prodid());
foreach ($this->model as $item) {
$out .= "BEGIN:VEVENT\n";
$out .= $this
->ical_value('SUMMARY:', $item
->getName());
$out .= $this
->ical_value('DTSTART:', date(self::DATE_FORMAT, $item
->getStarts()));
$out .= $this
->ical_value('DTEND:', date(self::DATE_FORMAT, $item
->getEnds()));
$out .= $this
->ical_value('DESCRIPTION:', $item
->getDescription());
$out .= $this
->ical_value('URL:', $item
->getUrl());
$out .= "END:VEVENT\n";
}
$out .= "END:VCALENDAR\n";
return $out;
}