Exemple #1
0
 public function __construct(BackendInterface $caldavBackend, $calendarInfo, IL10N $l10n)
 {
     parent::__construct($caldavBackend, $calendarInfo);
     if ($this->getName() === BirthdayService::BIRTHDAY_CALENDAR_URI) {
         $this->calendarInfo['{DAV:}displayname'] = $l10n->t('Contact birthdays');
     }
 }
 /**
  * Constructor
  *
  * @param Backend\BackendInterface $caldavBackend
  * @param array $calendarInfo
  */
 public function __construct(Backend\BackendInterface $caldavBackend, $calendarInfo)
 {
     $required = array('{http://calendarserver.org/ns/}shared-url', '{http://sabredav.org/ns}owner-principal', '{http://sabredav.org/ns}read-only');
     foreach ($required as $r) {
         if (!isset($calendarInfo[$r])) {
             throw new \InvalidArgumentException('The ' . $r . ' property must be specified for SharedCalendar(s)');
         }
     }
     parent::__construct($caldavBackend, $calendarInfo);
 }