Merge pull request #23501 from owncloud/alarms_for_birthdayevents

add VALARM for birthday events
This commit is contained in:
Thomas Müller 2016-04-06 14:31:07 +02:00
commit dda739c0cc
1 changed files with 5 additions and 0 deletions

View File

@ -147,6 +147,11 @@ class BirthdayService {
$vEvent->{'RRULE'} = 'FREQ=YEARLY';
$vEvent->{'SUMMARY'} = $title . ' (*' . $date->format('Y') . ')';
$vEvent->{'TRANSP'} = 'TRANSPARENT';
$alarm = $vCal->createComponent('VALARM');
$alarm->add($vCal->createProperty('TRIGGER', '-PT0M', ['VALUE' => 'DURATION']));
$alarm->add($vCal->createProperty('ACTION', 'DISPLAY'));
$alarm->add($vCal->createProperty('DESCRIPTION', $vEvent->{'SUMMARY'}));
$vEvent->add($alarm);
$vCal->add($vEvent);
return $vCal;
}