/** * Returns a list of calendars for a principal. * * Every project is an array with the following keys: * * id, a unique id that will be used by other functions to modify the * calendar. This can be the same as the uri or a database key. * * uri, which the basename of the uri with which the calendar is * accessed. * * principalUri. The owner of the calendar. Almost always the same as * principalUri passed to this method. * * Furthermore it can contain webdav properties in clark notation. A very * common one is '{DAV:}displayname'. * * @param string $principalUri * @return array */ function getCalendarsForUser($principalUri) { $calendars = parent::getCalendarsForUser($principalUri); foreach ($calendars as $k => $calendar) { if (isset($calendar['share-access'])) { continue; } if (!empty($this->shares[$calendar['id']])) { $calendar['share-access'] = DAV\Sharing\Plugin::ACCESS_SHAREDOWNER; } else { $calendar['share-access'] = DAV\Sharing\Plugin::ACCESS_NOTSHARED; } $calendars[$k] = $calendar; } return $calendars; }
function __construct(array $calendars = [], array $calendarData = [], array $notifications = []) { parent::__construct($calendars, $calendarData); $this->notifications = $notifications; }