Overview

Packages

  • Kronolith
  • None

Classes

  • Kronolith
  • Kronolith_Ajax_Application
  • Kronolith_Ajax_Imple_ContactAutoCompleter
  • Kronolith_Ajax_Imple_Embed
  • Kronolith_Ajax_Imple_TagActions
  • Kronolith_Ajax_Imple_TagAutoCompleter
  • Kronolith_Api
  • Kronolith_Calendar
  • Kronolith_Calendar_External
  • Kronolith_Calendar_External_Tasks
  • Kronolith_Calendar_Holiday
  • Kronolith_Calendar_Internal
  • Kronolith_Calendar_Remote
  • Kronolith_Calendar_Resource
  • Kronolith_Calendars_Base
  • Kronolith_Calendars_Default
  • Kronolith_Calendars_Kolab
  • Kronolith_Day
  • Kronolith_Driver
  • Kronolith_Driver_Holidays
  • Kronolith_Driver_Horde
  • Kronolith_Driver_Ical
  • Kronolith_Driver_Kolab
  • Kronolith_Driver_Mock
  • Kronolith_Driver_Resource
  • Kronolith_Driver_Sql
  • Kronolith_Event
  • Kronolith_Event_Holidays
  • Kronolith_Event_Horde
  • Kronolith_Event_Ical
  • Kronolith_Event_Kolab
  • Kronolith_Event_Resource
  • Kronolith_Event_Sql
  • Kronolith_Exception
  • Kronolith_Factory_Calendars
  • Kronolith_Factory_Geo
  • Kronolith_Form_CreateCalendar
  • Kronolith_Form_CreateResource
  • Kronolith_Form_CreateResourceGroup
  • Kronolith_Form_DeleteCalendar
  • Kronolith_Form_DeleteResource
  • Kronolith_Form_DeleteResourceGroup
  • Kronolith_Form_EditCalendar
  • Kronolith_Form_EditRemoteCalendar
  • Kronolith_Form_EditResource
  • Kronolith_Form_EditResourceGroup
  • Kronolith_Form_SubscribeRemoteCalendar
  • Kronolith_Form_UnsubscribeRemoteCalendar
  • Kronolith_FreeBusy
  • Kronolith_FreeBusy_View
  • Kronolith_FreeBusy_View_Day
  • Kronolith_FreeBusy_View_Month
  • Kronolith_FreeBusy_View_Week
  • Kronolith_FreeBusy_View_Workweek
  • Kronolith_Geo_Base
  • Kronolith_Geo_Mysql
  • Kronolith_Geo_Sql
  • Kronolith_LoginTasks_SystemTask_Upgrade
  • Kronolith_LoginTasks_Task_PurgeEvents
  • Kronolith_Notification_Listener_AjaxStatus
  • Kronolith_Resource
  • Kronolith_Resource_Base
  • Kronolith_Resource_Group
  • Kronolith_Resource_Single
  • Kronolith_Storage
  • Kronolith_Storage_Kolab
  • Kronolith_Storage_Sql
  • Kronolith_Tagger
  • Kronolith_Test
  • Kronolith_View_Day
  • Kronolith_View_DeleteEvent
  • Kronolith_View_EditEvent
  • Kronolith_View_Event
  • Kronolith_View_ExportEvent
  • Kronolith_View_Month
  • Kronolith_View_Week
  • Kronolith_View_WorkWeek
  • Kronolith_View_Year
  • Overview
  • Package
  • Class
  • Tree

Class Kronolith_Event

Kronolith_Event defines a generic API for events.

Copyright 1999-2012 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.

Direct known subclasses

Kronolith_Event_Holidays, Kronolith_Event_Horde, Kronolith_Event_Ical, Kronolith_Event_Kolab, Kronolith_Event_Sql

Indirect known subclasses

Kronolith_Event_Resource
Abstract
Package: Kronolith
Author: Chuck Hagenbuch chuck@horde.org
Author: Jan Schneider jan@horde.org
Located at Event.php
Methods summary
public
# __construct( Kronolith_Driver $driver, mixed $eventObject = null )

Constructor.

Constructor.

Parameters

$driver
<p>The backend driver that this event is stored in.</p>
$eventObject
<p>Backend specific event object that this will represent.</p>
public
# __set( string $name, mixed $value )

Setter.

Setter.

Sets the 'id' and 'creator' properties.

Parameters

$name
Property name.
$value
Property value.
public mixed
# __get( string $name )

Getter.

Getter.

Returns the 'id' and 'creator' properties.

Parameters

$name
Property name.

Returns

mixed
Property value.
public Kronolith_Driver
# getDriver( )

Returns a reference to a driver that's valid for this event.

Returns a reference to a driver that's valid for this event.

Returns

Kronolith_Driver

A driver that this event can use to save itself, etc.

public Horde_Share
# getShare( )

Returns the share this event belongs to.

Returns the share this event belongs to.

Returns

Horde_Share
This event's share.

Throws

Kronolith_Exception
public boolean
# hasPermission( integer $permission, string $user = null )

Encapsulates permissions checking.

Encapsulates permissions checking.

Parameters

$permission
The permission to check for.
$user
The user to check permissions for.

Returns

boolean
public integer
# save( )

Saves changes to this event.

Saves changes to this event.

Returns

integer
The event id.

Throws

Kronolith_Exception
public
# fromDriver( mixed $event )

Imports a backend specific event object.

Imports a backend specific event object.

Parameters

$event
<p>$eventObject Backend specific event object that this object will represent.</p>
public array
# toiCalendar( Horde_Icalendar $calendar )

Exports this event in iCalendar format.

Exports this event in iCalendar format.

Parameters

$calendar
<p>A Horde_Icalendar object that acts as a container.</p>

Returns

array
An array of Horde_Icalendar_Vevent objects for this event.
public
# fromiCalendar( Horde_Icalendar_Vevent $vEvent )

Updates the properties of this event from a Horde_Icalendar_Vevent object.

Updates the properties of this event from a Horde_Icalendar_Vevent object.

Parameters

$vEvent
<p>The iCalendar data to update from.</p>
public
# fromASAppointment( Horde_ActiveSync_Message_Appointment $message )

Imports the values for this event from a MS ActiveSync Message.

Imports the values for this event from a MS ActiveSync Message.

See

Horde_ActiveSync_Message_Appointment
public Horde_ActiveSync_Message_Appointment
# toASAppointment( )

Export this event as a MS ActiveSync Message

Export this event as a MS ActiveSync Message

Returns

Horde_ActiveSync_Message_Appointment
public
# fromHash( array $hash )

Imports the values for this event from an array of values.

Imports the values for this event from an array of values.

Parameters

$hash
Array containing all the values.

Throws

Kronolith_Exception
public array
# toAlarm( Horde_Date $time, string $user = null, Prefs $prefs = null )

Returns an alarm hash of this event suitable for Horde_Alarm.

Returns an alarm hash of this event suitable for Horde_Alarm.

Parameters

$time
Time of alarm.
$user
The user to return alarms for.
$prefs
A Prefs instance.

Returns

array
Alarm hash or null.
public stdClass
# toJson( boolean $allDay = null, boolean $full = false, string $time_format = 'H:i' )

Returns a simple object suitable for json transport representing this event.

Returns a simple object suitable for json transport representing this event.

Possible properties are: - t: title - d: description - c: calendar id - s: start date - e: end date - fi: first day of a multi-day event - la: last day of a multi-day event - x: status (Kronolith::STATUS_* constant) - al: all-day? - bg: background color - fg: foreground color - pe: edit permissions? - pd: delete permissions? - vl: variable, i.e. editable length? - a: alarm text or minutes - r: recurrence type (Horde_Date_Recurrence::RECUR_* constant) or json representation of Horde_Date_Recurrence object. - bid: The baseid for an event representing an exception - eod: The original date that an exception is replacing - ic: icon - ln: link - aj: ajax link - id: event id - ty: calendar type (driver) - l: location - u: url - sd: formatted start date - st: formatted start time - ed: formatted end date - et: formatted end time - at: attendees - tg: tag list

Parameters

$allDay
<p>If not null, overrides whether the event is an all-day event.</p>
$full
Whether to return all event details.
$time_format
The date() format to use for time formatting.

Returns

stdClass
A simple object.
public boolean
# exists( )

Checks if the current event is already present in the calendar.

Checks if the current event is already present in the calendar.

Does the check based on the uid.

Returns

boolean
True if event exists, false otherwise.
public
# getDuration( )
public boolean
# recurs( )

Returns whether this event is a recurring event.

Returns whether this event is a recurring event.

Returns

boolean
True if this is a recurring event.
public string
# getRecurName( )

Returns a description of this event's recurring type.

Returns a description of this event's recurring type.

Returns

string
Human readable recurring type.
public string
# exceptionLink( string $date )

Returns a correcty formatted exception date for recurring events and a link to delete this exception.

Returns a correcty formatted exception date for recurring events and a link to delete this exception.

Parameters

$date
Exception in the format Ymd.

Returns

string
The formatted date and delete link.
public string
# exceptionsList( )

Returns a list of exception dates for recurring events including links to delete them.

Returns a list of exception dates for recurring events including links to delete them.

Returns

string
List of exception dates and delete links.
public boolean
# isPrivate( string $user = null )

Returns whether the event should be considered private.

Returns whether the event should be considered private.

The event's private flag can be overriden if the current user is an administrator and the code is run from command line. This is to allow full event notifications in alarm messages or agendas.

Parameters

$user
The current user.

Returns

boolean
Whether to consider the event as private.
public string
# getTitle( string $user = null )

Returns the title of this event, considering private flags.

Returns the title of this event, considering private flags.

Parameters

$user
The current user.

Returns

string
The title of this event.
public string
# getLocation( string $user = null )

Returns the location of this event, considering private flags.

Returns the location of this event, considering private flags.

Parameters

$user
The current user.

Returns

string
The location of this event.
public boolean
# hasAttendee( string $email )

Checks to see whether the specified attendee is associated with the current event.

Checks to see whether the specified attendee is associated with the current event.

Parameters

$email
The email address of the attendee.

Returns

boolean

True if the specified attendee is present for this event.

public
# addAttendee( string $email, integer $attendance, integer $response, string $name = null )

Adds a new attendee to the current event.

Adds a new attendee to the current event.

This will overwrite an existing attendee if one exists with the same email address.

Parameters

$email
The email address of the attendee.
$attendance
The attendance code of the attendee.
$response
The response code of the attendee.
$name
The name of the attendee.
public
# addResource( Kronolith_Resource $resource, mixed $response )

Adds a single resource to this event.

Adds a single resource to this event.

No validation or acceptence/denial is done here...it should be done when saving the event.

Parameters

$resource
The resource to add.
$response
public
# removeResource( Kronolith_Resource $resource )

Removes a resource from this event.

Removes a resource from this event.

Parameters

$resource
The resource to remove.
public array
# getResources( )

Returns all resources.

Returns all resources.

Returns

array
A copy of the resources array.
public
# isAllDay( )
public
# readForm( )
public
# html( mixed $property )
public Horde_Url
# getViewUrl( array $params = array(), mixed $full = false, mixed $encoded = true )

Parameters

$params
$full
$encoded

Returns

Horde_Url
public Horde_Url
# getEditUrl( array $params = array(), mixed $full = false )

Parameters

$params
$full

Returns

Horde_Url
public Horde_Url
# getDeleteUrl( array $params = array(), mixed $full = false )

Parameters

$params
$full

Returns

Horde_Url
public Horde_Url
# getExportUrl( array $params = array(), mixed $full = false )

Parameters

$params
$full

Returns

Horde_Url
public
# getLink( mixed $datetime = null, mixed $icons = true, mixed $from_url = null, mixed $full = false, mixed $encoded = true )
public string
# getCSSColors( boolean $with_attribute = true )

Returns the CSS color definition for this event.

Returns the CSS color definition for this event.

Parameters

$with_attribute
<p>Whether to wrap the colors inside a "style" attribute.</p>

Returns

string
A CSS string with color definitions.
public string
# getTooltip( )

Returns

string
A tooltip for quick descriptions of this event.
public string
# getTimeRange( )

Returns

string

The time range of the event ("All Day", "1:00pm-3:00pm", "08:00-22:00").

public string
# getStatusClass( )

Returns

string
The CSS class for the event based on its status.
Properties summary
public boolean $initialized

Flag that is set to true if this event has data from either a storage backend or a form or other import method.

Flag that is set to true if this event has data from either a storage backend or a form or other import method.

# false
public boolean $stored

Flag that is set to true if this event exists in a storage driver.

Flag that is set to true if this event exists in a storage driver.

# false
public string $uid

The UID for this event.

The UID for this event.

# null
public integer $sequence

The iCalendar SEQUENCE for this event.

The iCalendar SEQUENCE for this event.

# null
public string $title

The title of this event.

The title of this event.

For displaying in the interface use getTitle() instead.

# ''
public string $location

The location this event occurs at.

The location this event occurs at.

# ''
public integer $status

The status of this event.

The status of this event.

# Kronolith::STATUS_CONFIRMED
public string $icon

URL to an icon of this event.

URL to an icon of this event.

# ''
public string $description

The description for this event.

The description for this event.

# ''
public string $url

URL of this event.

URL of this event.

# ''
public boolean $private

Whether the event is private.

Whether the event is private.

# false
public boolen $first

Whether this is the event on the first day of a multi-day event.

Whether this is the event on the first day of a multi-day event.

# true
public boolen $last

Whether this is the event on the last day of a multi-day event.

Whether this is the event on the last day of a multi-day event.

# true
public array $attendees

All the attendees of this event.

All the attendees of this event.

This is an associative array where the keys are the email addresses of the attendees, and the values are also associative arrays with keys 'attendance' and 'response' pointing to the attendees' attendance and response values, respectively.

# array()
public Horde_Date $start

The start time of the event.

The start time of the event.

#
public Horde_Date $end

The end time of the event.

The end time of the event.

#
public integer $durMin

The duration of this event in minutes

The duration of this event in minutes

# 0
public boolean $allday

Whether this is an all-day event.

Whether this is an all-day event.

# false
public integer $alarm

Number of minutes before the event starts to trigger an alarm.

Number of minutes before the event starts to trigger an alarm.

# 0
public array $methods

The particular alarm methods overridden for this event.

The particular alarm methods overridden for this event.

#
public string $calendar

The identifier of the calender this event exists on.

The identifier of the calender this event exists on.

#
public string $calendarType

The type of the calender this event exists on.

The type of the calender this event exists on.

#
public Horde_Date_Recurrence $recurrence

The Horde_Date_Recurrence class for this event.

The Horde_Date_Recurrence class for this event.

#
public string $baseid

The baseid. For events that represent exceptions this is the UID of the original, recurring event.

The baseid. For events that represent exceptions this is the UID of the original, recurring event.

#
public Horde_Date $exceptionoriginaldate

For exceptions, the date of the original recurring event that this is an exception for.

For exceptions, the date of the original recurring event that this is an exception for.

#
API documentation generated by ApiGen