public function ICalendar::generateString in Opigno calendar event 8
Same name and namespace in other branches
- 3.x src/iCal/ICalendar.php \Drupal\opigno_calendar_event\iCal\ICalendar::generateString()
The function generates the actual content of the ICS file and returns it.
1 call to ICalendar::generateString()
- ICalendar::generateDownload in src/
iCal/ ICalendar.php - Call this function to download the invite.
File
- src/
iCal/ ICalendar.php, line 51
Class
- ICalendar
- Class ICalendar.
Namespace
Drupal\opigno_calendar_event\iCalCode
public function generateString() {
$content = "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//" . $this->author . "//NONSGML//EN\r\n" . "X-WR-CALNAME:" . $this->title . "\r\nCALSCALE:GREGORIAN\r\n";
foreach ($this->events as $event) {
$content .= $event
->generateString();
}
$content .= "END:VCALENDAR";
return $content;
}