Properties

$_external

$_external : 

Type

Methods

poll()

poll() 

Just polls for alarm messages and keeps session fresh for now.

listCalendars()

listCalendars() 

Returns a list of all calendars.

listEvents()

listEvents() 

TODO

getEvent()

getEvent() 

Returns a JSON object representing the requested event.

Request variables used:

  • cal: The calendar id
  • id: The event id
  • date: The date of the event we are requesting [OPTIONAL]
  • rsd: The event start date of the instance of a recurring event, if requesting a specific instance.
  • red: The event end date of the instance of a recurring event, if requesting a specific instance.

saveEvent()

saveEvent() 

Save a new or update an existing event from the AJAX event detail view.

Request parameters used:

  • event: The event id.
  • cal: The calendar id.
  • targetcalendar: If moving events, the targetcalendar to move to.
  • as_new: Save an existing event as a new event.
  • recur_edit: If editing an instance of a recurring event series, how to apply the edit [current|future|all].
  • rstart: If editing an instance of a recurring event series, the original start datetime of this instance.
  • rend: If editing an instance of a recurring event series, the original ending datetime of this instance.
  • sendupdates: Should updates be sent to attendees?
  • cstart: Start time of the client cache.
  • cend: End time of the client cache.

quickSaveEvent()

quickSaveEvent() 

TODO

updateEvent()

updateEvent() 

Update event details as a result of a drag/drop operation (which would only affect the event's start/end times).

Uses the following request variables:

  -cal:  The calendar id.
  -id:   The event id.
  -att:  Attribute hash of changed values. Can contain:
     -start:     A new start datetime for the event.
     -end:       A new end datetime for the event.
     -offDays:   An offset of days to apply to the event.
     -offMins:   An offset of minutes to apply to the event.
     -rstart:    The orginal start datetime of a series instance.
     -rend:      The original end datetime of a series instance.
     -rday:      A new start value for a series instance (used when
                 dragging on the month view where only the date can
                 change, and not the start/end times).
     -u:         Send update to attendees.

deleteEvent()

deleteEvent() 

Deletes an event, or an instance of an event series from the backend.

Uses the following request variables:

  - cal:          The calendar id.
  - id:           The event id.
  - r:            If this is an event series, what type of deletion to
                  perform [future | current | all].
  - rstart:       The start time of the event instance being removed, if
                  this is a series instance.
  - cstart:       The start date of the client event cache.
  - cend:         The end date of the client event cache.
  - sendupdates:  Send cancellation notice to attendees?

searchEvents()

searchEvents() 

TODO

listTasks()

listTasks() 

TODO

getTask()

getTask() 

TODO

saveTask()

saveTask() 

TODO

quickSaveTask()

quickSaveTask() 

TODO

deleteTask()

deleteTask() 

TODO

toggleCompletion()

toggleCompletion() 

TODO

listTopTags()

listTopTags() 

Generate a list of most frequently used tags for the current user.

getFreeBusy()

getFreeBusy() 

Return fb information for the requested attendee or resource.

Uses the following request parameters:

  • user: The attendee's user name.
  • email: The attendee's email address.
  • resource: The resource id.

searchCalendars()

searchCalendars() 

TODO

saveCalendar()

saveCalendar() 

TODO

deleteCalendar()

deleteCalendar() 

TODO

getCalendar()

getCalendar() 

Returns the information for a shared internal calendar.

getRemoteInfo()

getRemoteInfo() 

TODO

saveCalPref()

saveCalPref() 

TODO

getResourceList()

getResourceList() : array

Return a list of available resources.

Returns

array —

A hash of resource_id => resource sorted by resource name.

embed()

embed() 

Handle output of the embedded widget: allows embedding calendar widgets in external websites.

The following arguments are required:

  • calendar: The share_name for the requested calendar.
  • container: The DOM node to populate with the widget.
  • view: The view (block) we want.

The following are optional (and are not used for all views)

  • css
  • days
  • maxevents: The maximum number of events to show.
  • months: The number of months to include.

toTimeslice()

toTimeslice() 

checkResources()

checkResources() 

Check reply status of any resources and report back. Used as a check before saving an event to give the user feedback.

The following arguments are expected:

  • r: A comma separated string of resource identifiers.
  • s: The event start time to check.
  • e: The event end time to check.
  • u: The event uid, if not a new event.
  • c: The event's calendar.

addFile()

addFile() 

Add a file to an event.

The following arguments are expected:

  • i: The event id.
  • c: The calendar id.

    The actual file data is returned in $_FILES and is handled in self::_addFileFromUpload()

deleteFile()

deleteFile() 

Removes a file from the specified event.

The following arguments are expected:

  • source: The type|calender source string.
  • key: The event id.
  • name: The filename to delete.

_canUploadFiles()

_canUploadFiles() : integer

Check ability to upload files.

Returns

integer —

Maximum allowed size of file.

_addFileFromUpload()

_addFileFromUpload() : array

Collect uploaded files.

Returns

array —

An array of fileinfo hashes.

_getDriver()

_getDriver(string  $cal) : \Kronolith_Driver|boolean

Returns the driver object for a calendar.

Parameters

string $cal

A calendar string in the format "type|name".

Returns

\Kronolith_Driver|boolean —

A driver instance or false on failure.

_saveEvent()

_saveEvent(\Kronolith_Event  $event, \Kronolith_Event  $original = null, object  $attributes = null, boolean  $saveOriginal = false) : object

Saves an event and returns a signed result object including the saved event.

Parameters

\Kronolith_Event $event

An event object.

\Kronolith_Event $original

If $event is an exception, this should be set to the original event.

object $attributes

The attributes sent by the client. Expected to contain cstart and cend.

boolean $saveOriginal

Commit any changes in $original to storage also.

Returns

object —

The result object.

_signedResponse()

_signedResponse(string  $calendar) : object

Creates a result object with the signature of the current request.

Parameters

string $calendar

A calendar id.

Returns

object —

The result object.

_addException()

_addException(\Kronolith_Event  $event, object  $attributes) : \Kronolith_Event

Add an exception to the original event.

Parameters

\Kronolith_Event $event

The recurring event.

object $attributes

The attributes passed from the client. Expected to contain either rstart or rday.

Returns

\Kronolith_Event

The event representing the exception, with the start/end times set the same as the original occurence.

_copyEvent()

_copyEvent(\Kronolith_Event  $event, \Kronolith_Event  $copy = null, \stdClass  $attributes = null) : \Kronolith_Event

Creates a new event that represents an exception to a recurring event.

Parameters

\Kronolith_Event $event

The original recurring event.

\Kronolith_Event $copy

If present, contains a copy of $event, but with changes from edited event form.

\stdClass $attributes

The attributes passed from the client. Expected to contain rstart and rend or rday that represents the original starting/ending date of the instance.

Returns

\Kronolith_Event

The event representing the exception