CalendarHome
The CalendarHome represents a node that is usually in a users' calendar-homeset.
It contains all the users' calendars, and can optionally contain a notifications collection, calendar subscriptions, a users' inbox, and a users' outbox.
- Full name:
\Sabre\CalDAV\CalendarHome
- This class implements:
\Sabre\DAV\IExtendedCollection
,\Sabre\DAVACL\IACL
Properties
caldavBackend
CalDAV backend.
principalInfo
Principal information.
Methods
__construct
Constructor.
public __construct(\Sabre\CalDAV\Backend\BackendInterface $caldavBackend, array $principalInfo): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$caldavBackend |
\Sabre\CalDAV\Backend\BackendInterface | |
$principalInfo |
array |
getName
Returns the name of this object.
setName
Updates the name of this object.
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string |
delete
Deletes this object.
getLastModified
Returns the last modification date.
createFile
Creates a new file under this object.
This is currently not allowed
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string | |
$data |
resource |
createDirectory
Creates a new directory under this object.
This is currently not allowed.
Parameters:
Parameter | Type | Description |
---|---|---|
$filename |
string |
getChild
Returns a single calendar, by name.
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string |
childExists
Checks if a calendar exists.
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string |
getChildren
Returns a list of calendars.
createExtendedCollection
Creates a new calendar or subscription.
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string | |
$mkCol |
\Sabre\DAV\MkCol |
Throws:
getOwner
Returns the owner of the calendar home.
getACL
Returns a list of ACE's for this node.
Each ACE has the following properties: * 'privilege', a string such as {DAV:}read or {DAV:}write. These are currently the only supported privileges * 'principal', a url to the principal who owns the node * 'protected' (optional), indicating that this ACE is not allowed to be updated.
shareReply
This method is called when a user replied to a request to share.
public shareReply(string $href, int $status, string $calendarUri, string $inReplyTo, string $summary = null): string|null
This method should return the url of the newly created calendar if the share was accepted.
Parameters:
Parameter | Type | Description |
---|---|---|
$href |
string | The sharee who is replying (often a mailto: address) |
$status |
int | One of the SharingPlugin::STATUS_* constants |
$calendarUri |
string | The url to the calendar thats being shared |
$inReplyTo |
string | The unique id this message is a response to |
$summary |
string | A description of the reply |
getCalendarObjectByUID
Searches through all of a users calendars and calendar objects to find an object with a specific UID.
This method should return the path to this object, relative to the calendar home, so this path usually only contains two parts:
calendarpath/objectpath.ics
If the uid is not found, return null.
This method should only consider * objects that the principal owns, so any calendars owned by other principals that also appear in this collection should be ignored.
Parameters:
Parameter | Type | Description |
---|---|---|
$uid |
string |
Inherited methods
getOwner
Returns the owner principal.
This must be a url to a principal, or null if there's no owner
getGroup
Returns a group principal.
This must be a url to a principal, or null if there's no owner
getACL
Returns a list of ACE's for this node.
Each ACE has the following properties: * 'privilege', a string such as {DAV:}read or {DAV:}write. These are currently the only supported privileges * 'principal', a url to the principal who owns the node * 'protected' (optional), indicating that this ACE is not allowed to be updated.
setACL
Updates the ACL.
This method will receive a list of new ACE's as an array argument.
Parameters:
Parameter | Type | Description |
---|---|---|
$acl |
array |
getSupportedPrivilegeSet
Returns the list of supported privileges for this node.
The returned data structure is a list of nested privileges. See Sabre\DAVACL\Plugin::getDefaultSupportedPrivilegeSet for a simple standard structure.
If null is returned from this method, the default privilege set is used, which is fine for most common usecases.
Automatically generated on 2025-03-18