IManager¶
-
interface
OCP\Calendar\
IManager
¶ - This class provides access to the Nextcloud CalDAV backend.Use this class exclusively if you want to access calendars.Events/Journals/Todos in general will be expressed as an array of key-value-pairs.The keys will match the property names defined in https://tools.ietf.org/html/rfc5545[‘id’ => 123,‘type’ => ‘VEVENT’,‘calendar-key’ => 42,‘objects’ => [[‘SUMMARY’ => [‘FooBar’, []],‘DTSTART’ => [‘20171001T123456’, [‘TZID’ => ‘EUROPE/BERLIN’]],‘DURATION’ => [‘P1D’, []],‘ATTENDEE’ => [[‘mailto:bla@blub.com‘, [‘CN’ => ‘Mr. Bla Blub’]]],‘VALARM’ => [[‘TRIGGER’ => [‘19980101T050000Z’, [‘VALUE’ => DATE-TIME]]]]],]]
Implemented by: OC\Calendar\Manager
Source: lib/public/Calendar/IManager.php#57
Methods¶
-
public
OCP\Calendar\IManager::
search
($pattern, $searchProperties=[], $options=[], $limit=null, $offset=null)¶ - This function is used to search and find objects within the user’s calendars.In case $pattern is empty all events/journals/todos will be returned.
Source: Parameters: - $pattern (string) which should match within the $searchProperties
- $searchProperties (array) defines the properties within the query pattern should match
- $options (array) - optional parameters:
[‘timerange’ => [‘start’ => new DateTime(...), ‘end’ => new DateTime(...)]] * $limit (int | null) - limit number of search results * $offset (int | null) - offset for paging of search results
Returns: array an array of events/journals/todos which are arrays of arrays of key-value-pairs
Since: 13.0.0
-
public
OCP\Calendar\IManager::
isEnabled
()¶ - Check if calendars are available
Source: lib/public/Calendar/IManager.php#80 Returns: bool true if enabled, false if not Since: 13.0.0
-
public
OCP\Calendar\IManager::
registerCalendar
($calendar)¶ - Registers a calendar
Source: Parameters: - $calendar (
OCP\Calendar\ICalendar
)
Returns: void
Since: 13.0.0
- $calendar (
-
public
OCP\Calendar\IManager::
unregisterCalendar
($calendar)¶ - Unregisters a calendar
Source: Parameters: - $calendar (
OCP\Calendar\ICalendar
)
Returns: void
Since: 13.0.0
- $calendar (
-
public
OCP\Calendar\IManager::
register
($callable)¶ - In order to improve lazy loading a closure can be registered which will be called in casecalendars are actually requested
Source: Parameters: - $callable (
Closure
)
Returns: void
Since: 13.0.0
- $callable (
-
public
OCP\Calendar\IManager::
getCalendars
()¶ Source: lib/public/Calendar/IManager.php#114 Returns: \OCP\Calendar\ICalendar[]
Since: 13.0.0
-
public
OCP\Calendar\IManager::
clear
()¶ - removes all registered calendar instances
Source: lib/public/Calendar/IManager.php#121 Returns: void Since: 13.0.0