299 foreach ($this->
getContainer()->getItemsByName(
'SUMMARY',
false) as $item) {
300 if (is_a($item,
'ilICalProperty')) {
301 $entry->setTitle($this->
purgeString($item->getValue()));
306 foreach ($this->
getContainer()->getItemsByName(
'DESCRIPTION',
false) as $item) {
307 if (is_a($item,
'ilICalProperty')) {
308 $entry->setDescription($this->
purgeString($item->getValue()));
314 foreach ($this->
getContainer()->getItemsByName(
'LOCATION',
false) as $item) {
315 if (is_a($item,
'ilICalProperty')) {
316 $entry->setLocation($this->
purgeString($item->getValue()));
321 foreach ($this->
getContainer()->getItemsByName(
'DTSTART') as $start) {
323 foreach ($start->getItemsByName(
'VALUE') as
$type) {
324 if (
$type->getValue() ==
'DATE') {
329 foreach ($start->getItemsByName(
'TZID') as
$param) {
341 $start_tz->getIdentifier()
344 $entry->setStart($start);
345 $entry->setFullday($fullday);
348 foreach ($this->
getContainer()->getItemsByName(
'DTEND') as $end) {
350 foreach ($end->getItemsByName(
'VALUE') as
$type) {
351 if (
$type->getValue() ==
'DATE') {
356 foreach ($end->getItemsByName(
'TZID') as
$param) {
369 $end_tz->getIdentifier()
372 $entry->setEnd($end);
373 $entry->setFullday($fullday);
376 if (!$entry->getStart() instanceof
ilDateTime) {
377 $this->log->warning(
'Cannot find start date. Event ignored.');
386 $entry->setEnd($entry->getStart());
391 $entry->setAutoGenerated(
true);
397 foreach ($this->
getContainer()->getItemsByName(
'EXDATE',
false) as $item) {
398 if (is_a($item,
'ilICalProperty')) {
400 $rec_exclusion->setEntryId($entry->getEntryId());
402 $rec_exclusion->save();
410 foreach ($this->
getContainer()->getItemsByName(
'RRULE') as $recurrence) {
412 $rec->setEntryId($entry->getEntryId());
414 foreach ($recurrence->getItemsByName(
'FREQ') as $freq) {
415 switch ($freq->getValue()) {
420 $rec->setFrequenceType((
string) $freq->getValue());
424 $this->log->notice(
': Cannot handle recurring event of type: ' . $freq->getValue());
429 foreach ($recurrence->getItemsByName(
'COUNT') as $value) {
430 $rec->setFrequenceUntilCount((
int) $value->getValue());
433 foreach ($recurrence->getItemsByName(
'UNTIL') as $until) {
437 foreach ($recurrence->getItemsByName(
'INTERVAL') as $value) {
438 $rec->setInterval((
int) $value->getValue());
441 foreach ($recurrence->getItemsByName(
'BYDAY') as $value) {
442 $rec->setBYDAY((
string) $value->getValue());
445 foreach ($recurrence->getItemsByName(
'BYWEEKNO') as $value) {
446 $rec->setBYWEEKNO((
string) $value->getValue());
449 foreach ($recurrence->getItemsByName(
'BYMONTH') as $value) {
450 $rec->setBYMONTH((
string) $value->getValue());
453 foreach ($recurrence->getItemsByName(
'BYMONTHDAY') as $value) {
454 $rec->setBYMONTHDAY((
string) $value->getValue());
457 foreach ($recurrence->getItemsByName(
'BYYEARDAY') as $value) {
458 $rec->setBYYEARDAY((
string) $value->getValue());
461 foreach ($recurrence->getItemsByName(
'BYSETPOS') as $value) {
462 $rec->setBYSETPOS((
string) $value->getValue());
465 foreach ($recurrence->getItemsByName(
'WKST') as $value) {
466 $rec->setWeekstart((
string) $value->getValue());
getTZ(string $a_timezone)
purgeString(string $a_string)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilTimeZone $default_timezone
addAssignment(int $a_cal_cat_id)
Stores exclusion dates for calendar recurrences.