|
| | __construct ($range_id, $start=null, $end=null) |
| |
| | getEvents ($class_names=null, $start=null, $end=null) |
| |
| | storeEvent (CalendarEvent $event, $attendee_ids=null) |
| |
| | setStart ($start) |
| |
| | getStart () |
| |
| | setEnd ($end) |
| |
| | getEnd () |
| |
| | getEvent ($event_id=null, $class_names=null) |
| |
| | getNewEvent () |
| |
| | sortEvents () |
| |
| | getId () |
| |
| | getRangeId () |
| |
| | getRange () |
| |
| | getPermissionByUser ($user_id=null) |
| |
| | havePermission ($permission, $user_id=null) |
| |
| | checkPermission ($permission, $user_id=null) |
| |
| | deleteEvent ($calendar_event, $all=false) |
| |
| | getListCountEvents ($class_names=null, $user_id=null, $restrictions=null) |
| |
| | createEventMatrix ($start, $end, $step) |
| |
| | adapt_events ($start, $end, $step=900) |
| |
|
| static | getEventList ($owner_id, $start, $end, $user_id=null, $restrictions=null, $class_names=null) |
| |
| static | getDayCalendar ($owner, $time, $user_id=null, $restrictions=null, $class_names=null) |
| |
| static | checkRestriction (Event $event, $restrictions) |
| |
◆ __construct()
| __construct |
( |
|
$range_id, |
|
|
|
$start = null, |
|
|
|
$end = null |
|
) |
| |
◆ adapt_events()
| adapt_events |
( |
|
$start, |
|
|
|
$end, |
|
|
|
$step = 900 |
|
) |
| |
Returns array with events and other information to build calendar tables for day view.
- Parameters
-
| int | $start | Start time date as unix timestamp |
| int | $end | End time date as unix timestamp |
| int | $step | Seconds between each row in calendar table. |
- Returns
- Array Array with new calculated events and some other things.
◆ checkPermission()
| checkPermission |
( |
|
$permission, |
|
|
|
$user_id = null |
|
) |
| |
Returns whether the given user has the $permission to this calendar. It checks for the actual user if $user_id is null.
- Parameters
-
| int | $permission | An accepted calendar permission. |
| string | null | $user_id | The id of the user. |
- Returns
- bool True if the user has the given permission.
◆ checkRestriction()
| static checkRestriction |
( |
Event |
$event, |
|
|
|
$restrictions |
|
) |
| |
|
static |
TODO use filter instead
- Parameters
-
| Event | $event | |
| array | $restrictions | |
- Returns
- boolean
◆ createEventMatrix()
| createEventMatrix |
( |
|
$start, |
|
|
|
$end, |
|
|
|
$step |
|
) |
| |
Returns an array with all necessary informations to build the day view.
- Parameters
-
| type | $start | |
| type | $end | |
| type | $step | |
| type | $params | |
- Returns
- type
◆ deleteEvent()
| deleteEvent |
( |
|
$calendar_event, |
|
|
|
$all = false |
|
) |
| |
Deletes an event from this calendar.
- Parameters
-
| string | object | $calendar_event | The id of an event or an event object of type CalendarEvent. |
| boolean | $all | If true all events of a group event will be deleted. |
- Returns
- boolean|int The number of deleted events. False if the event was not deleted.
◆ getDayCalendar()
| static getDayCalendar |
( |
|
$owner, |
|
|
|
$time, |
|
|
|
$user_id = null, |
|
|
|
$restrictions = null, |
|
|
|
$class_names = null |
|
) |
| |
|
static |
Returns a SingleCalendar object with all events of the given owner or SingleCalendar object for one day set by timestamp.
- Parameters
-
| string | SingleCalendar | $owner | The user id of calendar owner or a calendar object. |
| int | $time | A unix timestamp of this day. |
| string | $user_id | The id of the user who gets access to the calendar (optional, default current user) |
| array | $restrictions | An array with key value pairs of properties to filter the result (optional). |
| array | $class_names | Array of class names. The class must implement Event (optional). |
- Returns
- \SingleCalendar Calendar Object with all events of given day.
◆ getEnd()
Returns the end date time of this calendar as a unix timestamp.
- Returns
- int Unix timestamp.
◆ getEvent()
| getEvent |
( |
|
$event_id = null, |
|
|
|
$class_names = null |
|
) |
| |
Returns a event by given $event_id. Returns a new event of type CalendarEvent with default data if the id is null or unknown. If $class_names is set, only these types of Object will be returned.
- Parameters
-
| string | $event_id | |
| array | $class_names | Names of classes which inherits Event. |
- Returns
- Event|null The found event, a new CalendarEvent or null if no event other than a CalendarEvent was found.
◆ getEventList()
| static getEventList |
( |
|
$owner_id, |
|
|
|
$start, |
|
|
|
$end, |
|
|
|
$user_id = null, |
|
|
|
$restrictions = null, |
|
|
|
$class_names = null |
|
) |
| |
|
static |
Returns an array of all events (with calculated recurrences) in the given time range.
- Parameters
-
| string | $owner_id | The user id of calendar owner. |
| int | $time | A unix timestamp of this day. |
| string | $user_id | The id of the user who gets access to the calendar (optional, default current user) |
| array | $restrictions | An array with key value pairs of properties to filter the result (optional). |
| array | $class_names | Array of class names. The class must implement Event (optional). |
- Returns
- array All events in the given time range (with calculated recurrences)
◆ getEvents()
| getEvents |
( |
|
$class_names = null, |
|
|
|
$start = null, |
|
|
|
$end = null |
|
) |
| |
Returns all events of given class names between start and end. Returns events of all types if no class names are given.
- Parameters
-
| array | null | $class_names | The names of classes that implements Event. |
| int | $start | The start date time. |
| int | $end | The end date time. |
- Returns
- \SingleCalendar This calendar object.
- Exceptions
-
◆ getId()
◆ getListCountEvents()
| getListCountEvents |
( |
|
$class_names = null, |
|
|
|
$user_id = null, |
|
|
|
$restrictions = null |
|
) |
| |
Returns an array with all days between start and end of this SingleCalendar. The keys are the timestamps of the days (12:00) and the values are number of events for a day.
- Parameters
-
| string | $user_id | Use the permissions of this user. |
| array | $restrictions | |
- Returns
- array An array with year day as key and number of events per day as value.
◆ getNewEvent()
Creates a new event, sets some default data and returns it.
- Returns
- \CalendarEvent The new event.
◆ getPermissionByUser()
| getPermissionByUser |
( |
|
$user_id = null | ) |
|
Returns the permission of the given user for this calendar.
- Parameters
-
- Returns
- int The calendar permission.
◆ getRange()
Returns the object range of this calendar.
- Returns
- int The object range.
◆ getRangeId()
Returns the range id of this calendar. Possible range id are for objects of type user, inst, fak, group.
- Returns
- string The range id.
◆ getStart()
Returns the start date time of this calendar as a unix timestamp.
- Returns
- int Unix timestamp.
◆ havePermission()
| havePermission |
( |
|
$permission, |
|
|
|
$user_id = null |
|
) |
| |
Returns whether the given user has at least the $permission to this calendar. It checks for the actual user if $user_id is null.
- Parameters
-
| int | $permission | An accepted calendar permission. |
| string | null | $user_id | The id of the user. |
- Returns
- bool True if the user has at least the given permission.
◆ sendDeleteMessage()
| sendDeleteMessage |
( |
|
$event | ) |
|
|
protected |
Sends a message to the owner of the calendar that this event was deleted by another user.
- Parameters
-
◆ sendStoreMessage()
| sendStoreMessage |
( |
|
$event, |
|
|
|
$is_new |
|
) |
| |
|
protected |
Sends a message to the owner of the calendar that a new event was inserted or an old event was modified by another user.
- Parameters
-
| CalendarEvent | $event | The new or updated event. |
| bool | $is_new | True if the event is new. |
◆ setEnd()
Sets the end date time by given unix timestamp.
- Parameters
-
◆ setStart()
Sets the start date time by given unix timestamp.
- Parameters
-
◆ sortEvents()
Sorts all events by start time.
◆ storeEvent()
Stores the event in the calendars of all attendees.
- Parameters
-
| CalendarEvent | $event | The event to store. |
| array | $attendee_ids | The user ids of the attendees. |
- Returns
- bool|int The number of stored events or false if an error occured.
◆ $end
◆ $events
◆ $range
◆ $range_object
◆ $start
◆ $type
The documentation for this class was generated from the following file: