Kronolith_Calendar_External
extends Kronolith_Calendar
in package
Kronolith_Calendar_External defines an API for single timeobject calendars.
Copyright 2010-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
Table of Contents
- $_api : string
- The application of this timeobject source.
- $_id : string
- The ID of this timeobject source.
- $_name : string
- The name of this timeobject source.
- $_type : string
- The type of timeobject.
- __construct() : mixed
- Constructor.
- api() : string
- Returns the application of this calendar.
- background() : string
- Returns the background color for this calendar.
- caldavUrl() : string
- Returns the CalDAV URL to this calendar.
- css() : string
- Returns the CSS color definition for this calendar.
- description() : string
- Returns the description of this calendar.
- display() : bool
- Whether this calendar is supposed to be displayed in lists.
- foreground() : string
- Returns the foreground color for this calendar.
- hasPermission() : bool
- Encapsulates permissions checking.
- name() : string
- Returns the name of this calendar.
- owner() : string
- Returns the owner of this calendar.
- toHash() : array<string|int, mixed>
- Returns a hash representing this calendar.
- _caldavUrl() : string
- Returns the CalDAV URL for a calendar or task list.
Properties
$_api
The application of this timeobject source.
protected
string
$_api
$_id
The ID of this timeobject source.
protected
string
$_id
$_name
The name of this timeobject source.
protected
string
$_name
$_type
The type of timeobject.
protected
string
$_type
= 'share'
I.e., a single or share type.
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
A hash with any parameters that this calendar might need.
Return values
mixed —api()
Returns the application of this calendar.
public
api() : string
Return values
string —This calendar's timeobject application.
background()
Returns the background color for this calendar.
public
background() : string
Return values
string —A HTML color code.
caldavUrl()
Returns the CalDAV URL to this calendar.
public
caldavUrl() : string
Return values
string —This calendar's CalDAV URL.
css()
Returns the CSS color definition for this calendar.
public
css([bool $with_attribute = true ]) : string
Parameters
- $with_attribute : bool = true
-
Whether to wrap the colors inside a "style" attribute.
Return values
string —A CSS string with color definitions.
description()
Returns the description of this calendar.
public
description() : string
Return values
string —This calendar's description.
display()
Whether this calendar is supposed to be displayed in lists.
public
display() : bool
Return values
bool —True if this calendar should be displayed.
foreground()
Returns the foreground color for this calendar.
public
foreground() : string
Return values
string —A HTML color code.
hasPermission()
Encapsulates permissions checking.
public
hasPermission(int $permission[, string $user = null ][, string $creator = null ]) : bool
Parameters
- $permission : int
-
The permission to check for.
- $user : string = null
-
The user to check permissions for. Defaults to the current user.
- $creator : string = null
-
An event creator, to check for creator permissions.
Return values
bool —Whether the user has the permission on this calendar.
name()
Returns the name of this calendar.
public
name() : string
Return values
string —This calendar's name.
owner()
Returns the owner of this calendar.
public
owner() : string
Return values
string —This calendar's owner.
toHash()
Returns a hash representing this calendar.
public
toHash() : array<string|int, mixed>
Return values
array<string|int, mixed> —A simple hash.
_caldavUrl()
Returns the CalDAV URL for a calendar or task list.
protected
_caldavUrl(string $id, string $interface) : string
Parameters
- $id : string
-
A collection ID.
- $interface : string
-
The collection's application.
Return values
string —The collection's CalDAV URL.