STATUS_NONE
STATUS_NONE
Event status
Kronolith base library.
The Kronolith class provides functionality common to all of Kronolith.
$_tagger : \Kronolith_Tagger
permissionToJson(\Horde_Perms_Permission $perm, boolean $systemShare = false) : array
Converts a permission object to a json object.
This methods filters out any permissions for the owner and converts the user name if necessary.
\Horde_Perms_Permission | $perm | A permission object. |
boolean | $systemShare | Is this from a system share? |
A hash suitable for json.
listAlarms(\Horde_Date $date, array $calendars, boolean $fullevent = false) : array
Returns all the alarms active on a specific date.
\Horde_Date | $date | The date to check for alarms. |
array | $calendars | The calendars to check for events. |
boolean | $fullevent | Whether to return complete alarm objects or only alarm IDs. |
The alarms active on the date. A hash with calendar names as keys and arrays of events or event ids as values.
listEvents(\Horde_Date $startDate, \Horde_Date $endDate, array $calendars = null, array $options = array()) : array
Returns all the events that happen each day within a time period
\Horde_Date | $startDate | The start of the time range. |
\Horde_Date | $endDate | The end of the time range. |
array | $calendars | The calendars to check for events. |
array | $options | Additional options:
|
The events happening in this time period.
mergeEvents(array $results, array $events)
Merges results from two listEvents() result sets.
array | $results | First list of events. |
array | $events | List of events to be merged into the first one. |
None found |
addEvents( $results, $event, $startDate, $endDate, $showRecurrence, $json, $coverDates = true)
Calculates recurrences of an event during a certain period.
$results | ||
$event | ||
$startDate | ||
$endDate | ||
$showRecurrence | ||
$json | ||
$coverDates |
None found |
addCoverDates( $results, \Kronolith_Event $event, \Horde_Date $eventStart, \Horde_Date $eventEnd, boolean $json, \Horde_Date $originalStart = null, \Horde_Date $originalEnd = null, \Horde_Date $endDate = null)
Adds an event to all the days it covers.
$results | ||
\Kronolith_Event | $event | An event object. |
\Horde_Date | $eventStart | The event's start of the actual recurrence. |
\Horde_Date | $eventEnd | The event's end of the actual recurrence. |
boolean | $json | Store the results of the events' toJson() method? |
\Horde_Date | $originalStart | The actual starting time of a single event spanning multiple days. |
\Horde_Date | $originalEnd | The actual ending time of a single event spanning multiple days. |
\Horde_Date | $endDate |
None found |
addSearchEvents(array $events, \Kronolith_Event $event, \stdClass $query, boolean $json)
Adds an event to set of search results.
array | $events | The list of events to update with the new event. |
\Kronolith_Event | $event | An event from a search result. |
\stdClass | $query | A search query. |
boolean | $json | Store the results of the events' toJson() method? |
None found |
countEvents() : integer
Returns the number of events in calendars that the current user owns.
The number of events.
None found |
quickAdd(string $text, string $calendar = null) : array
Imports an event parsed from a string.
string | $text | The text to parse into an event |
string | $calendar | The calendar into which the event will be imported. If 'null', the user's default calendar will be used. |
The UID of all events that were added.
None found |
None found |
getUserEmail( $uid)
Returns the email address, if available, of a user.
$uid |
None found |
isUserEmail(string $uid, string $email)
Checks if an email address belongs to a user.
string | $uid | user id to check |
string | email address to check |
None found |
validateUserAttendee(string $user) : mixed
Return Kronolith_Attendee object for a local user.
string | $user | The local username. |
Return the Kronolith_Attendee object for $user, or false if the auth backend supports user listing and the user is not found.
None found |
recurToString(integer $type) : string
Maps a Kronolith recurrence value to a translated string suitable for display.
integer | $type | The recurrence value; one of the Horde_Date_Recurrence::RECUR_XXX constants. |
The translated displayable recurrence value string.
None found |
statusToString(integer $status) : string
Maps a Kronolith meeting status string to a translated string suitable for display.
integer | $status | The meeting status; one of the Kronolith::STATUS_XXX constants. |
The translated displayable meeting status string.
None found |
responseToString(integer $response) : string
Maps a Kronolith attendee response string to a translated string suitable for display.
integer | $response | The attendee response; one of the Kronolith::RESPONSE_XXX constants. |
The translated displayable attendee response string.
None found |
partToString(integer $part) : string
Maps a Kronolith attendee participation string to a translated string suitable for display.
integer | $part | The attendee participation; one of the Kronolith::PART_XXX constants. |
The translated displayable attendee participation string.
None found |
responseFromICal(string $response) : string
Maps an iCalendar attendee response string to the corresponding Kronolith value.
string | $response | The attendee response. |
The Kronolith response value.
None found |
buildStatusWidget(string $name, string $current = self::STATUS_CONFIRMED, string $any = false) : string
Builds the HTML for an event status widget.
string | $name | The name of the widget. |
string | $current | The selected status value. |
string | $any | Whether an 'any' item should be added |
The HTML
None found |
listInternalCalendars(boolean $owneronly = false, integer $permission = \Horde_Perms::SHOW, string $user = null) : array
Returns all internal calendars a user has access to, according to several parameters/permission levels.
This method takes the $conf['share']['hidden'] setting into account. If this setting is enabled, even if requesting permissions different than SHOW, it will only return calendars that the user owns or has SHOW permissions for. For checking individual calendar's permissions, use hasPermission() instead.
boolean | $owneronly | Only return calenders that this user owns? Defaults to false. |
integer | $permission | The permission to filter calendars by. |
string | $user | The user to list calendars for, if not the current. |
The calendar list.
None found |
listCalendars(integer $permission = \Horde_Perms::SHOW, boolean $display = false) : array
Returns all calendars a user has access to, according to several parameters/permission levels.
integer | $permission | The permission to filter calendars by. |
boolean | $display | Only return calendars that are supposed to be displayed per configuration and user preference. |
The calendar list.
None found |
getDefaultCalendar(integer $permission = \Horde_Perms::SHOW, boolean $owner_only = false) : string
Returns the default calendar for the current user at the specified permissions level.
integer | $permission | Horde_Perms constant for permission level required. |
boolean | $owner_only | Only consider owner-owned calendars. |
The calendar id, or null if none.
None found |
getSyncCalendars(boolean $prune = false) : array
Returns the calendars that should be used for syncing.
boolean | $prune | Remove calendar ids from the sync list that no longer exist. The values are pruned after the results are passed back to the client to give sync clients a chance to remove their entries. |
An array of calendar ids
None found |
None found |
getLabel( $calendar) : string
Returns the label to be used for a calendar.
Attaches the owner name of shared calendars if necessary.
$calendar |
The calendar's label.
None found |
hasPermission(string $calendar, integer $perm) : boolean
Returns whether the current user has certain permissions on a calendar.
string | $calendar | A calendar id. |
integer | $perm | A Horde_Perms permission mask. |
True if the current user has the requested permissions.
None found |
addShare(array $info) : \Horde_Share
Creates a new share.
array | $info | Hash with calendar information. |
The new share.
None found |
updateShare( $calendar, array $info)
Updates an existing share.
$calendar | ||
array | $info | Hash with calendar information. |
None found |
deleteShare(\Horde_Share $calendar)
Deletes a share and removes all events associated with it.
\Horde_Share | $calendar | The share to delete. |
None found |
listShareUsers(\Horde_Share_Object $share) : array
Returns a list of user with read access to a share.
\Horde_Share_Object | $share | A share object. |
A hash of share users.
None found |
readPermsForm(\Horde_Share_Object|\Kronolith_Resource_Base $share) : array
Reads a submitted permissions form and updates the share permissions.
\Horde_Share_Object|\Kronolith_Resource_Base | $share | The share to update. |
A list of error messages.
None found |
subscribeRemoteCalendar(array $info, string $update = false)
Subscribes to or updates a remote calendar.
array | $info | Hash with calendar information. |
string | $update | If present, the original URL of the calendar to update. |
None found |
unsubscribeRemoteCalendar(string $url) : array
Unsubscribes from a remote calendar.
string | $url | The calendar URL. |
Hash with the deleted calendar's information.
None found |
feedUrl(string $calendar) : string
Returns the feed URL for a calendar.
string | $calendar | A calendar name. |
The calendar's feed URL.
None found |
embedCode(string $calendar) : string
Returs the HTML/javascript snippit needed to embed a calendar in an external website.
string | $calendar | A calendar name. |
The calendar's embed snippit.
None found |
attendeeList() : string
Returns a comma separated list of attendees and resources
Attendee/Resource list.
None found |
sendITipNotifications(\Kronolith_Event $event, \Horde_Notification_Handler $notification, integer $action, \Horde_Date $instance = null, string $range = null, \Kronolith_Attendee_List $cancellations = null)
Sends out iTip event notifications to all attendees of a specific event.
Can be used to send event invitations, event updates as well as event cancellations.
\Kronolith_Event | $event | The event in question. |
\Horde_Notification_Handler | $notification | A notification object used to show result status. |
integer | $action | The type of notification to send. One of the Kronolith::ITIP_* values. |
\Horde_Date | $instance | If cancelling a single instance of a recurring event, the date of this instance. |
string | $range | The range parameter if this is a recurring event. Possible values are self::RANGE_THISANDFUTURE |
\Kronolith_Attendee_List | $cancellations | If $action is 'CANCEL', but it is due to removing attendees and not canceling the entire event, these are the uninvited attendees and are the ONLY people that will receive the CANCEL iTIP. @since 4.2.10 |
None found |
sendNotification(\Kronolith_Event $event, string $action)
Sends email notifications that a event has been added, edited, or deleted to users that want such notifications.
\Kronolith_Event | $event | An event. |
string | $action | The event action. One of "add", "edit", or "delete". |
None found |
notifyOfResourceRejection(\Kronolith_Event $event)
Check for resource declines and push notice to stack if found.
\Kronolith_Event | $event |
None found |
_notificationPref(string $user, string $mode, string $calendar = null) : mixed
Returns whether a user wants email notifications for a calendar.
string | $user | A user name. |
string | $mode | The check "mode". If "owner", the method checks if the user wants notifications only for calendars he owns. If "read", the method checks if the user wants notifications for all calendars he has read access to, or only for shown calendars and the specified calendar is currently shown. |
string | $calendar | The name of the calendar if mode is "read". |
The user's email, time, and language preferences if they want a notification for this calendar.
todo |
This method is causing a memory leak somewhere, noticeable if importing a large amount of events. |
---|
buildMimeMessage(\Horde_View $view, string $template, \Horde_Mime_Part $image) : \Horde_Mime_Part
Builds the body MIME part of a multipart message.
\Horde_View | $view | A view to render the HTML and plain text templates for the messate. |
string | $template | The template base name for the view. |
\Horde_Mime_Part | $image | The MIME part of a related image. |
A multipart/alternative MIME part.
None found |
getImagePart(string $file) : \Horde_Mime_Part
Returns a MIME part for an image to be embedded into a HTML document.
string | $file | An image file name. |
A MIME part representing the image.
None found |
parseDate(string $date, boolean $withtime = true, $timezone = null) : \Horde_Date
Parses a complete date-time string into a Horde_Date object.
string | $date | The date-time string to parse. |
boolean | $withtime | Whether time is included in the string. |
$timezone |
The parsed date.
þaram |
string $timezone The timezone of the string. |
---|
eventTabs(string $tabname, \Kronolith_Event $event)
string | $tabname | |
\Kronolith_Event | $event |
None found |
getDriver(string $driver = null, string $calendar = null) : \Kronolith_Driver
Attempts to return a single, concrete Kronolith_Driver instance based on a driver name.
This singleton method automatically retrieves all parameters required for the specified driver.
string | $driver | The type of concrete Kronolith_Driver subclass to return. |
string | $calendar | The calendar name. The format depends on the driver being used. |
The newly created concrete Kronolith_Driver instance.
None found |
getCalendar(\Kronolith_Driver $driver) : \Kronolith_Calendar
Returns a Kronolith_Calendar object for a driver instance.
\Kronolith_Driver | $driver |
The matching calendar instance.
since |
Kronolith 4.0.1 |
---|
getRemoteParams( $calendar)
Check for HTTP authentication credentials
$calendar |
None found |
displayedCalendars() : array
Returns a list of currently displayed calendars.
Currently displayed calendars.
None found |
getView(string $view)
Get a named Kronolith_View_* object and load it with the appropriate date parameters.
string | $view | The name of the view. |
None found |
viewShowLocation()
Should we show event location, based on the show_location pref?
None found |
None found |
backgroundColor(array|\Horde_Share_Object $calendar) : string
Returns the background color for a calendar.
array|\Horde_Share_Object | $calendar | A calendar share or a hash from a remote calender definition. |
A HTML color code.
None found |
foregroundColor(array|\Horde_Share_Object|string $calendar) : string
Returns the foreground color for a calendar or a background color.
array|\Horde_Share_Object|string | $calendar | A color string, a calendar share or a hash from a remote calender definition. |
A HTML color code.
None found |
getCSSColors(array|\Horde_Share_Object $calendar, boolean $with_attribute = true) : string
Returns the CSS color definition for a calendar.
array|\Horde_Share_Object | $calendar | A calendar share or a hash from a remote calender definition. |
boolean | $with_attribute | Whether to wrap the colors inside a "style" attribute. |
A CSS string with color definitions.
None found |
randomColor() : string
Returns a random CSS color.
A random CSS color string.
None found |
showAjaxView()
Returns whether to display the ajax view.
return boolean True if the ajax view should be displayed.
None found |
sortEvents(array $days) : array
Sorts an event list.
array | $days | A list of days with events. |
The sorted day list.
None found |
getTagger() : \Kronolith_Tagger
Obtain a Kronolith_Tagger instance
None found |
getInternalCalendar(string $target) : \Kronolith_Resource|\Horde_Share_Object
Obtain an internal calendar. Use this where we don't know if we will have a Horde_Share or a Kronolith_Resource based calendar.
string | $target | The calendar id to retrieve. |
None found |
getAddressbookSearchParams() : array
Determines parameters needed to do an address search
An array with two keys: 'fields' and 'sources'.
None found |
hasApiPermission(string $api, integer $perm = \Horde_Perms::READ) : boolean
Checks whether an API (application) exists and the user has permission to access it.
string | $api | The API (application) to check. |
integer | $perm | The permission to check. |
True if the API can be accessed.
None found |
removeUserEvents(string $user)
Remove all events owned by the specified user in all calendars.
string | $user | The user name to delete events for. |
None found |
toTimeslice(\Kronolith_Event $event, integer $type, string $client)
Exports an event to a timeslice.
\Kronolith_Event | $event | An event. |
integer | $type | A job type ID. |
string | $client | A client ID. |
None found |