isSubscription() || !$calendar->canWrite() || $calendar->isShared() || $calendar->isDeleted()) { throw new DavException('Calendar is a subscription, not writable, shared or deleted'); } // Calendar must support VEVENTs $sCCS = '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set'; $calendarProperties = $calendar->getProperties([$sCCS]); if (isset($calendarProperties[$sCCS])) { $supportedComponents = $calendarProperties[$sCCS]->getValue(); } else { $supportedComponents = ['VJOURNAL', 'VTODO', 'VEVENT']; } if (!in_array('VEVENT', $supportedComponents, true)) { throw new DavException('Calendar does not support VEVENT components'); } } }