Documentation

Kronolith_Ajax_Application_Handler extends Horde_Core_Ajax_Application_Handler
in package

Defines the AJAX actions used in Kronolith.

Copyright 2012-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Tags
author

Michael Slusarz slusarz@horde.org

author

Jan Schneider jan@horde.org

author

Gonçalo Queirós mail@goncaloqueiros.net

category

Horde

license

http://www.horde.org/licenses/gpl GPL

Table of Contents

$_external  : mixed
addFile()  : mixed
Add a file to an event.
checkResources()  : mixed
Check reply status of any resources and report back. Used as a check before saving an event to give the user feedback.
deleteCalendar()  : mixed
TODO
deleteEvent()  : mixed
Deletes an event, or an instance of an event series from the backend.
deleteFile()  : mixed
Removes a file from the specified event.
deleteTask()  : mixed
TODO
embed()  : mixed
Handle output of the embedded widget: allows embedding calendar widgets in external websites.
getCalendar()  : mixed
Returns the information for a shared internal calendar.
getEvent()  : mixed
Returns a JSON object representing the requested event.
getFreeBusy()  : mixed
Return fb information for the requested attendee or resource.
getRemoteInfo()  : mixed
TODO
getResourceList()  : array<string|int, mixed>
Return a list of available resources.
getTask()  : mixed
TODO
listCalendars()  : mixed
Returns a list of all calendars.
listEvents()  : mixed
TODO
listTasks()  : mixed
TODO
listTopTags()  : mixed
Generate a list of most frequently used tags for the current user.
poll()  : mixed
Just polls for alarm messages and keeps session fresh for now.
quickSaveEvent()  : mixed
TODO
quickSaveTask()  : mixed
TODO
saveCalendar()  : mixed
TODO
saveCalPref()  : mixed
TODO
saveEvent()  : mixed
Save a new or update an existing event from the AJAX event detail view.
saveTask()  : mixed
TODO
searchCalendars()  : mixed
TODO
searchEvents()  : mixed
TODO
toggleCompletion()  : mixed
TODO
toTimeslice()  : mixed
updateEvent()  : mixed
Update event details as a result of a drag/drop operation (which would only affect the event's start/end times).
_addException()  : Kronolith_Event
Add an exception to the original event.
_addFileFromUpload()  : array<string|int, mixed>
Collect uploaded files.
_canUploadFiles()  : int
Check ability to upload files.
_copyEvent()  : Kronolith_Event
Creates a new event that represents an exception to a recurring event.
_getDriver()  : Kronolith_Driver|bool
Returns the driver object for a calendar.
_saveEvent()  : object
Saves an event and returns a signed result object including the saved event.
_signedResponse()  : object
Creates a result object with the signature of the current request.

Properties

$_external

protected mixed $_external = array('embed')

Methods

addFile()

Add a file to an event.

public addFile() : mixed

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()

Return values
mixed

checkResources()

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

public checkResources() : mixed

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.
Return values
mixed

deleteCalendar()

TODO

public deleteCalendar() : mixed
Return values
mixed

deleteEvent()

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

public deleteEvent() : mixed

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?
Return values
mixed

deleteFile()

Removes a file from the specified event.

public deleteFile() : mixed

The following arguments are expected:

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

deleteTask()

TODO

public deleteTask() : mixed
Return values
mixed

embed()

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

public embed() : mixed

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.
Return values
mixed

getCalendar()

Returns the information for a shared internal calendar.

public getCalendar() : mixed
Return values
mixed

getEvent()

Returns a JSON object representing the requested event.

public getEvent() : mixed

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.
Return values
mixed

getFreeBusy()

Return fb information for the requested attendee or resource.

public getFreeBusy() : mixed

Uses the following request parameters:

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

getRemoteInfo()

TODO

public getRemoteInfo() : mixed
Return values
mixed

getResourceList()

Return a list of available resources.

public getResourceList() : array<string|int, mixed>
Return values
array<string|int, mixed>

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

getTask()

TODO

public getTask() : mixed
Return values
mixed

listCalendars()

Returns a list of all calendars.

public listCalendars() : mixed
Return values
mixed

listEvents()

TODO

public listEvents() : mixed
Return values
mixed

listTasks()

TODO

public listTasks() : mixed
Return values
mixed

listTopTags()

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

public listTopTags() : mixed
Return values
mixed

poll()

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

public poll() : mixed
Return values
mixed

quickSaveEvent()

TODO

public quickSaveEvent() : mixed
Return values
mixed

quickSaveTask()

TODO

public quickSaveTask() : mixed
Return values
mixed

saveCalendar()

TODO

public saveCalendar() : mixed
Return values
mixed

saveCalPref()

TODO

public saveCalPref() : mixed
Return values
mixed

saveEvent()

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

public saveEvent() : mixed

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.
Return values
mixed

saveTask()

TODO

public saveTask() : mixed
Return values
mixed

searchCalendars()

TODO

public searchCalendars() : mixed
Return values
mixed

searchEvents()

TODO

public searchEvents() : mixed
Return values
mixed

toggleCompletion()

TODO

public toggleCompletion() : mixed
Return values
mixed

toTimeslice()

public toTimeslice() : mixed
Return values
mixed

updateEvent()

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

public updateEvent() : mixed

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.
Return values
mixed

_addException()

Add an exception to the original event.

protected _addException(Kronolith_Event $event, object $attributes) : Kronolith_Event
Parameters
$event : Kronolith_Event

The recurring event.

$attributes : object

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

Return values
Kronolith_Event

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

_addFileFromUpload()

Collect uploaded files.

protected _addFileFromUpload() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array of fileinfo hashes.

_canUploadFiles()

Check ability to upload files.

protected _canUploadFiles() : int
Return values
int

Maximum allowed size of file.

_copyEvent()

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

protected _copyEvent(Kronolith_Event $event[, Kronolith_Event $copy = null ][, stdClass $attributes = null ]) : Kronolith_Event
Parameters
$event : Kronolith_Event

The original recurring event.

$copy : Kronolith_Event = null

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

$attributes : stdClass = null

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

Return values
Kronolith_Event

The event representing the exception

_getDriver()

Returns the driver object for a calendar.

protected _getDriver(string $cal) : Kronolith_Driver|bool
Parameters
$cal : string

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

Return values
Kronolith_Driver|bool

A driver instance or false on failure.

_saveEvent()

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

protected _saveEvent(Kronolith_Event $event[, Kronolith_Event $original = null ][, object $attributes = null ][, bool $saveOriginal = false ]) : object
Parameters
$event : Kronolith_Event

An event object.

$original : Kronolith_Event = null

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

$attributes : object = null

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

$saveOriginal : bool = false

Commit any changes in $original to storage also.

Return values
object

The result object.

_signedResponse()

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

protected _signedResponse(string $calendar) : object
Parameters
$calendar : string

A calendar id.

Return values
object

The result object.

Search results