PHP Class Kronolith_Ajax_Application_Handler, horde

Copyright 2012-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Author: Michael Slusarz ([email protected])
Author: Jan Schneider ([email protected])
Author: Gonçalo Queirós ([email protected])
Inheritance: extends Horde_Core_Ajax_Application_Handler
显示文件 Open project: horde/horde

Protected Properties

Property Type Description
$_external

Public Methods

Method Description
addFile ( ) Add a file to an event.
checkResources ( ) Check reply status of any resources and report back. Used as a check before saving an event to give the user feedback.
deleteCalendar ( ) TODO
deleteEvent ( ) Deletes an event, or an instance of an event series from the backend.
deleteFile ( ) Removes a file from the specified event.
deleteTask ( ) TODO
embed ( ) Handle output of the embedded widget: allows embedding calendar widgets in external websites.
getCalendar ( ) Returns the information for a shared internal calendar.
getEvent ( ) Returns a JSON object representing the requested event.
getFreeBusy ( ) Return fb information for the requested attendee or resource.
getRemoteInfo ( ) TODO
getResourceList ( ) : array Return a list of available resources.
getTask ( ) TODO
listCalendars ( ) Returns a list of all calendars.
listEvents ( ) TODO
listTasks ( ) TODO
listTopTags ( ) Generate a list of most frequently used tags for the current user.
poll ( ) Just polls for alarm messages and keeps session fresh for now.
quickSaveEvent ( ) TODO
quickSaveTask ( ) TODO
saveCalPref ( ) TODO
saveCalendar ( ) TODO
saveEvent ( ) Save a new or update an existing event from the AJAX event detail view.
saveTask ( ) TODO
searchCalendars ( ) TODO
searchEvents ( ) TODO
toTimeslice ( )
toggleCompletion ( ) TODO
updateEvent ( ) Update event details as a result of a drag/drop operation (which would only affect the event's start/end times).

Protected Methods

Method Description
_addException ( Kronolith_Event $event, object $attributes ) : Kronolith_Event Add an exception to the original event.
_addFileFromUpload ( ) : array Collect uploaded files.
_canUploadFiles ( ) : integer Check ability to upload files.
_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.
_getDriver ( string $cal ) : Kronolith_Driver | boolean Returns the driver object for a calendar.
_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.
_signedResponse ( string $calendar ) : object Creates a result object with the signature of the current request.

Method Details

_addException() protected method

Add an exception to the original event.
protected _addException ( Kronolith_Event $event, object $attributes ) : Kronolith_Event
$event Kronolith_Event The recurring event.
$attributes object The attributes passed from the client. Expected to contain either rstart or rday.
return Kronolith_Event The event representing the exception, with the start/end times set the same as the original occurence.

_addFileFromUpload() protected method

Collect uploaded files.
protected _addFileFromUpload ( ) : array
return array An array of fileinfo hashes.

_canUploadFiles() protected method

Check ability to upload files.
protected _canUploadFiles ( ) : integer
return integer Maximum allowed size of file.

_copyEvent() protected method

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
$event Kronolith_Event The original recurring event.
$copy Kronolith_Event If present, contains a copy of $event, but with changes from edited event form.
$attributes stdClass 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 Kronolith_Event The event representing the exception

_getDriver() protected method

Returns the driver object for a calendar.
protected _getDriver ( string $cal ) : Kronolith_Driver | boolean
$cal string A calendar string in the format "type|name".
return Kronolith_Driver | boolean A driver instance or false on failure.

_saveEvent() protected method

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, boolean $saveOriginal = false ) : object
$event Kronolith_Event An event object.
$original Kronolith_Event If $event is an exception, this should be set to the original event.
$attributes object The attributes sent by the client. Expected to contain cstart and cend.
$saveOriginal boolean Commit any changes in $original to storage also.
return object The result object.

_signedResponse() protected method

Creates a result object with the signature of the current request.
protected _signedResponse ( string $calendar ) : object
$calendar string A calendar id.
return object The result object.

addFile() public method

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

checkResources() public method

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.
public checkResources ( )

deleteCalendar() public method

TODO
public deleteCalendar ( )

deleteEvent() public method

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?
public deleteEvent ( )

deleteFile() public method

The following arguments are expected: - source: The type|calender source string. - key: The event id. - name: The filename to delete.
public deleteFile ( )

deleteTask() public method

TODO
public deleteTask ( )

embed() public method

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.
public embed ( )

getCalendar() public method

Returns the information for a shared internal calendar.
public getCalendar ( )

getEvent() public method

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.
public getEvent ( )

getFreeBusy() public method

Uses the following request parameters: - user: The attendee's user name. - email: The attendee's email address. - resource: The resource id.
public getFreeBusy ( )

getRemoteInfo() public method

TODO
public getRemoteInfo ( )

getResourceList() public method

Return a list of available resources.
public getResourceList ( ) : array
return array A hash of resource_id => resource sorted by resource name.

getTask() public method

TODO
public getTask ( )

listCalendars() public method

Returns a list of all calendars.
public listCalendars ( )

listEvents() public method

TODO
public listEvents ( )

listTasks() public method

TODO
public listTasks ( )

listTopTags() public method

Generate a list of most frequently used tags for the current user.
public listTopTags ( )

poll() public method

Just polls for alarm messages and keeps session fresh for now.
public poll ( )

quickSaveEvent() public method

TODO
public quickSaveEvent ( )

quickSaveTask() public method

TODO
public quickSaveTask ( )

saveCalPref() public method

TODO
public saveCalPref ( )

saveCalendar() public method

TODO
public saveCalendar ( )

saveEvent() public method

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.
public saveEvent ( )

saveTask() public method

TODO
public saveTask ( )

searchCalendars() public method

TODO
public searchCalendars ( )

searchEvents() public method

TODO
public searchEvents ( )

toTimeslice() public method

public toTimeslice ( )

toggleCompletion() public method

TODO
public toggleCompletion ( )

updateEvent() public method

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.
public updateEvent ( )

Property Details

$_external protected_oe property

protected $_external