$_external
$_external :
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.
getEvent()
Returns a JSON object representing the requested event.
Request variables used:
saveEvent()
Save a new or update an existing event from the AJAX event detail view.
Request parameters used:
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()
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?
embed()
Handle output of the embedded widget: allows embedding calendar widgets in external websites.
The following arguments are required:
The following are optional (and are not used for all views)
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:
_getDriver(string $cal) : \Kronolith_Driver|boolean
Returns the driver object for a calendar.
string | $cal | A calendar string in the format "type|name". |
A driver instance or false on failure.
_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.
\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. |
The result object.
_addException(\Kronolith_Event $event, object $attributes) : \Kronolith_Event
Add an exception to the original event.
\Kronolith_Event | $event | The recurring event. |
object | $attributes | The attributes passed from the client. Expected to contain either rstart or rday. |
The event representing the exception, with the start/end times set the same as the original occurence.
_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.
\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. |
The event representing the exception