Stud.IP  5.4
 All Data Structures Namespaces Files Functions Variables Groups
Event Interface Reference
Inheritance diagram for Event:
CalendarEvent CourseEvent CourseCancelledEvent CourseMarkedEvent

Public Member Functions

 toStringCategories ()
 
 getRecurrence ($index=null)
 
 getType ()
 
 getTitle ()
 
 getStart ()
 
 getEnd ()
 
 getDuration ()
 
 getLocation ()
 
 getUid ()
 
 getDescription ()
 
 getCategory ()
 
 getEditorId ()
 
 isDayEvent ()
 
 getAccessibility ()
 
 getChangeDate ()
 
 getImportDate ()
 
 getProperties ()
 
 getProperty ($name)
 
 havePermission ($permission, $user_id=null)
 
 getPermission ($user_id=null)
 
 toStringPriority ()
 
 toStringAccessibility ()
 
 toStringRecurrence ($only_type=false)
 
 getAuthor ()
 
 getEditor ()
 

Data Fields

const PERMISSION_FORBIDDEN = 0
 
const PERMISSION_CONFIDENTIAL = 1
 
const PERMISSION_READABLE = 2
 
const PERMISSION_DELETABLE = 3
 
const PERMISSION_WRITABLE = 4
 
const PERMISSION_OWN = 5
 

Member Function Documentation

getAccessibility ( )

Returns the accessibility of this event. The value is not influenced by the permission of the actual user.

According to RFC5545 the accessibility (property CLASS) is represented by the 3 values PUBLIC, PRIVATE and CONFIDENTIAL. In RFC5545 the default value is PUBLIC. In Stud.IP the default is PRIVATE.

Returns
string The accessibility as string.

Implemented in CalendarEvent, and CourseEvent.

getAuthor ( )

Returns the author of this event as user object.

Returns
User|null User object.

Implemented in CalendarEvent, and CourseEvent.

getCategory ( )

Returns the index of the category. If the user has no permission, 255 is returned.

See Also
config/config.inc.php $TERMIN_TYP
Returns
int The index of the category

Implemented in CalendarEvent, CourseEvent, CourseCancelledEvent, and CourseMarkedEvent.

getChangeDate ( )

Returns the unix timestamp of the last change.

public

Implemented in CalendarEvent, and CourseEvent.

getDescription ( )

Returns the description of the topic. If the user has no permission or the event has no topic or the topics have no descritopn an empty string is returned.

Returns
String the description

Implemented in CalendarEvent, CourseEvent, CourseCancelledEvent, and CourseMarkedEvent.

getDuration ( )

Returns the duration of this event in seconds.

Returns
int the duration of this event in seconds

Implemented in CalendarEvent, and CourseEvent.

getEditor ( )

Returns the editor of this event as user object.

Returns
User|null User object.

Implemented in CalendarEvent, and CourseEvent.

getEditorId ( )

Returns the user id of the last editor.

Returns
null|int The editor id.

Implemented in CalendarEvent, and CourseEvent.

getEnd ( )

Returns the endtime as unix timestamp of this event.

Returns
int the endtime of this event as a unix timestamp

Implemented in CalendarEvent, and CourseEvent.

getImportDate ( )

Returns the date time the event was imported.

TODO not sure if we need this anymore

Returns
int Date time of import as unix timestamp:

Implemented in CalendarEvent, and CourseEvent.

getLocation ( )

Returns the location. Without permission or the location is not set an empty string is returned.

Returns
string The location

Implemented in CalendarEvent, and CourseEvent.

getPermission (   $user_id = null)
getProperties ( )

Returns all properties of this event. The name of the properties correspond to the properties of the iCalendar calendar data exchange format. There are a few properties with the suffix STUDIP_ which have no eqivalent in the iCalendar format.

DTSTART: The start date-time as unix timestamp. DTEND: The end date-time as unix timestamp. SUMMARY: The short description (title) that will be displayed in the views. DESCRIPTION: The long description. UID: The global unique id of this event. CLASS: CATEGORIES: A comma separated list of categories. PRIORITY: The priority. LOCATION: The location. EXDATE: A comma separated list of unix timestamps. CREATED: The creation date-time as unix timestamp. LAST-MODIFIED: The date-time of last modification as unix timestamp. DTSTAMP: The cration date-time of this instance of the event as unix timestamp. RRULE: All data for the recurrence rule for this event as array. EVENT_TYPE:

Returns
array The properties of this event.

Implemented in CalendarEvent, and CourseEvent.

getProperty (   $name)

Returns the value of property with given name.

Parameters
type$nameSee CalendarEvent::getProperties() for accepted values.
Returns
mixed The value of the property.
Exceptions
InvalidArgumentException

Implemented in CalendarEvent, and CourseEvent.

getRecurrence (   $index = null)

Returns an array that represents the recurrence rule for this event. If an index is given, returns only this field of the rule.

Returns
array|string The array with th recurrence rule or only one field.

Implemented in CalendarEvent, and CourseEvent.

getStart ( )

Returns the starttime as unix timestamp of this event.

Returns
int The starttime of this event as a unix timestamp

Implemented in CalendarEvent, and CourseEvent.

getTitle ( )

Returns the title of this event. If the user has not the permission Event::PERMISSION_READABLE, the title is "Keine Berechtigung.".

Returns
string

Implemented in CalendarEvent, CourseEvent, CourseCancelledEvent, and CourseMarkedEvent.

getType ( )

TODO Wird das noch benötigt?

Implemented in CalendarEvent, and CourseEvent.

getUid ( )

Returns the global uni id of this event.

Returns
string The global unique id.

Implemented in CalendarEvent, and CourseEvent.

havePermission (   $permission,
  $user_id = null 
)

Implemented in CalendarEvent, and CourseEvent.

isDayEvent ( )

Returns whether the event is a all day event.

Returns

Implemented in CalendarEvent, and CourseEvent.

toStringAccessibility ( )

Returns the accessibilty in a human readable form. If the user has no permission an epmty string will be returned.

Returns
string The accessibility as string.

Implemented in CalendarEvent, and CourseEvent.

toStringCategories ( )

Returns a list of all categories the event belongs to. Returns an empty string if no permission.

Returns
string All categories as list.
toStringPriority ( )

Returns the priority in a human readable form. If the user has no permission an epmty string will be returned.

Returns
string The priority as a string.

Implemented in CalendarEvent, and CourseEvent.

toStringRecurrence (   $only_type = false)

Returns a string representation of the recurrence rule. If $only_type is true returns only the type of the recurrence.

Parameters
bool$only_typeIf true returns only the type of recurrence.
Returns
string The recurrence rule - human readable

Implemented in CourseEvent, and CalendarEvent.

Field Documentation

const PERMISSION_CONFIDENTIAL = 1
const PERMISSION_DELETABLE = 3
const PERMISSION_FORBIDDEN = 0
const PERMISSION_OWN = 5
const PERMISSION_READABLE = 2
const PERMISSION_WRITABLE = 4

The documentation for this interface was generated from the following file: