Stud.IP  5.4
CalendarDateAssignment Class Reference
Inheritance diagram for CalendarDateAssignment:
SimpleORMap Event

Public Member Functions

 cbSendNewDateMail ()
 
 cbSendDateDeletedMail ()
 
 sendParticipationStatus ()
 
 getObjectId ()
 
 getPrimaryObjectID ()
 
 getObjectClass ()
 
 getTitle ()
 
 getBegin ()
 
 getEnd ()
 
 getDuration ()
 
 getDurationDays ()
 
 getLocation ()
 
 getUniqueId ()
 
 getDescription ()
 
 getAdditionalDescriptions ()
 
 isAllDayEvent ()
 
 isWritable (string $user_id)
 
 getCreationDate ()
 
 getModificationDate ()
 
 getImportDate ()
 
 getAuthor ()
 
 getEditor ()
 
 getExpire ()
 
 getNoonDate ()
 
 getRepetitionType ()
 
 toEventData (string $user_id)
 
 getRangeName ()
 
 getRangeAvatar ()
 
 getParticipationAsString ()
 
- Public Member Functions inherited from SimpleORMap
 __construct ($id=null)
 
 __clone ()
 
 getRelationOptions ($relation)
 
 getTableMetadata ()
 
 hasAutoIncrementColumn ()
 
 setId ($id)
 
 getId ()
 
 getNewId ()
 
 toArray ($only_these_fields=null)
 
 toRawArray ($only_these_fields=null)
 
 toArrayRecursive ($only_these_fields=null)
 
 getValue ($field)
 
 getRelationValue ($relation, $field)
 
 getDefaultValue ($field)
 
 setValue ($field, $value)
 
 __get ($field)
 
 __set ($field, $value)
 
 __isset ($field)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 getIterator ()
 
 count ()
 
 isField ($field)
 
 isRelation ($field)
 
 isAdditionalField ($field)
 
 isAliasField ($field)
 
 isI18nField ($field)
 
 setData ($data, $reset=false)
 
 isNew ()
 
 isDeleted ()
 
 setNew ($is_new)
 
 getWhereQuery ()
 
 restore ()
 
 store ()
 
 triggerChdate ()
 
 delete ()
 
 isDirty ()
 
 isFieldDirty ($field)
 
 revertValue ($field)
 
 getPristineValue ($field)
 
 initRelation ($relation)
 
 resetRelation ($relation)
 
 cleanup ()
 

Static Public Member Functions

static getEvents (DateTime $begin, DateTime $end, string $range_id, array $access_levels=['PUBLIC', 'PRIVATE', 'CONFIDENTIAL'], bool $with_declined=false)
 
static getExtent (DateTimeInterface $date_begin, DateTimeInterface $date_end)
 
- Static Public Member Functions inherited from SimpleORMap
static tableScheme ($db_table)
 
static expireTableScheme ()
 
static exists ($id)
 
static countBySql ($sql='1', $params=[])
 
static create ($data)
 
static build ($data, $is_new=true)
 
static buildExisting ($data)
 
static import ($data)
 
static findBySQL ($sql, $params=[])
 
static findOneBySQL ($where, $params=[])
 
static findThru ($foreign_key_value, $options)
 
static findEachBySQL ($callable, $sql, $params=[])
 
static findMany ($pks=[], $order='', $order_params=[])
 
static findEachMany ($callable, $pks=[], $order='', $order_params=[])
 
static findAndMapBySQL ($callable, $where, $params=[])
 
static findAndMapMany ($callable, $pks=[], $order='', $order_params=[])
 
static deleteBySQL ($where, $params=[])
 
static toObject ($id_or_object)
 
static __callStatic (string $name, array $arguments)
 
- Static Public Member Functions inherited from Event
static getEvents (DateTime $begin, DateTime $end, string $range_id)
 

Data Fields

 $suppress_mails = false
 
- Data Fields inherited from SimpleORMap
const ID_SEPARATOR = '_'
 

Static Protected Member Functions

static configure ($config=[])
 
- Static Protected Member Functions inherited from SimpleORMap
static db_table ()
 
static db_fields ()
 
static pk ()
 
static default_values ()
 
static serialized_fields ()
 
static alias_fields ()
 
static i18n_fields ()
 
static additional_fields ()
 
static has_many ()
 
static has_one ()
 
static belongs_to ()
 
static has_and_belongs_to_many ()
 
static registered_callbacks ()
 
static known_slots ()
 
static notification_map ()
 
static getter_setter_map ()
 
static configure ($config=[])
 
static config ($key)
 
static registerCallback ($types, $cb)
 
static unregisterCallback ($types, $cb)
 

Additional Inherited Members

- Static Public Attributes inherited from SimpleORMap
static $schemes = null
 
- Protected Member Functions inherited from SimpleORMap
 _getId ($field)
 
 _setId ($field, $value)
 
 _getAdditionalValueFromRelation ($field)
 
 _setAdditionalValueFromRelation ($field, $value)
 
 _getAdditionalValue ($field)
 
 _setAdditionalValue ($field, $value)
 
 parseRelationOptions ($type, $name, $options)
 
 storeRelations ($only_these=null)
 
 deleteRelations ()
 
 initializeContent ()
 
 applyCallbacks ($type)
 
 cbNotificationMapper ($cb_type)
 
 cbAfterInitialize ($cb_type)
 
 setSerializedValue ($field, $value)
 
 setI18nValue ($field, $value)
 
- Protected Attributes inherited from SimpleORMap
 $content = []
 
 $content_db = []
 
 $is_new = true
 
 $is_deleted = false
 
 $relations = []
 
 $additional_data = []
 
- Static Protected Attributes inherited from SimpleORMap
static $config = []
 
static $reserved_slots = ['value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id']
 
static $performs_batch_operation = false
 

Member Function Documentation

◆ cbSendDateDeletedMail()

cbSendDateDeletedMail ( )

◆ cbSendNewDateMail()

cbSendNewDateMail ( )

◆ configure()

static configure (   $config = [])
staticprotected

◆ getAdditionalDescriptions()

getAdditionalDescriptions ( )

Returns additional descriptions of the Event object. These are specific for each implementation.

Returns
array Additional descriptions for the Event implementation. Each array key represents a heading for the description and the value contains the description itself as plain text. In case this is not applicable for the implementation, an empty array is returned.

Implements Event.

◆ getAuthor()

getAuthor ( )

Returns the author of this event as user object.

Returns
User|null The user object of the author of the event, if available.

Implements Event.

◆ getBegin()

getBegin ( )

Returns the start time of the event.

Returns
DateTime The start time of the event.

Implements Event.

◆ getCreationDate()

getCreationDate ( )

Returns the creation date of the event.

Returns
DateTime The creation date of the event.

Implements Event.

◆ getDescription()

getDescription ( )

Returns the description of the event.

Returns
string The description of the event.

Implements Event.

◆ getDuration()

getDuration ( )

Returns the duration of the event.

Returns
DateInterval The duration of the event.

Implements Event.

◆ getDurationDays()

getDurationDays ( )

Returns the "extent" in days of this date.

Returns
int The "extent" in days of this date.

◆ getEditor()

getEditor ( )

Returns the editor of this event as user object.

Returns
User|null The user object of the editor of the event, if available.

Implements Event.

◆ getEnd()

getEnd ( )

Returns the end time of the event.

Returns
DateTime The end time of the event.

Implements Event.

◆ getEvents()

static getEvents ( DateTime  $begin,
DateTime  $end,
string  $range_id,
array  $access_levels = ['PUBLIC',
'PRIVATE'  ,
'CONFIDENTIAL']  ,
bool  $with_declined = false 
)
static

Retrieves calendar dates inside a specified time range that are present in the calendar of a course or user. They can additionally be filtered by the access level and declined events can be filtered out, too.

Parameters
DateTime$beginThe beginning of the time range.
DateTime$endThe end of the time range.
string$range_idThe ID of the course or user whose calendar dates shall be retrieved.
array$access_levelsThe access level filter: Only include calendar dates that have one of the access levels in the list.
bool$with_declinedInclude declined calendar dates (true) or filter them out (false). Defaults to false.
Returns
CalendarDateAssignment[] A list of calendar date assignments in the time range that match the filters.

◆ getExpire()

getExpire ( )

TODO calculate end of repetition for different types of repetition

Returns
float|int|object

◆ getExtent()

static getExtent ( DateTimeInterface  $date_begin,
DateTimeInterface  $date_end 
)
static

Returns the "extent" in days of this date. The extent is the number of days a date is displayed in a calendar.

Returns
int The "extent" in days of this date.

◆ getImportDate()

getImportDate ( )

Returns the import date of the event.

Returns
DateTime The import date of the event.

Implements Event.

◆ getLocation()

getLocation ( )

Returns the location where the event takes place, if applicable.

Returns
string The location of the event.

Implements Event.

◆ getModificationDate()

getModificationDate ( )

Returns the modification date of the event.

Returns
DateTime The modification date of the event.

Implements Event.

◆ getNoonDate()

getNoonDate ( )

◆ getObjectClass()

getObjectClass ( )

Returns the class of the Event implementation.

Returns
string The class name of the Event instance.

Implements Event.

◆ getObjectId()

getObjectId ( )

Returns the ID of the event. This is the ID that is only valid inside of Stud.IP.

Returns
string The ID of the event object.

Implements Event.

◆ getParticipationAsString()

getParticipationAsString ( )

◆ getPrimaryObjectID()

getPrimaryObjectID ( )

Returns the ID of the primary object where this object is linked to in a primary-secondary relationship where this object is a secondary object.

Example: A course date is a secondary object and the course it belongs to is the primary object.

Returns
string The ID of the primary object or an empty string if the implementation of the Event interface is a class of primary objects.

Implements Event.

◆ getRangeAvatar()

getRangeAvatar ( )

◆ getRangeName()

getRangeName ( )

◆ getRepetitionType()

getRepetitionType ( )

Returns the type of repetition.

Returns
string The type of repetition.

◆ getTitle()

getTitle ( )

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

Returns
string The title of the event.

Implements Event.

◆ getUniqueId()

getUniqueId ( )

Returns the global unique id of the event.

Returns
string The global unique id of the event.

Implements Event.

◆ isAllDayEvent()

isAllDayEvent ( )

Returns whether the event is an all day event or not.

Returns
bool True, if the event is an all day event, false otherwise.

Implements Event.

◆ isWritable()

isWritable ( string  $user_id)

Determines whether the specified user has write permissions for the event.

Parameters
string$user_idThe user for which to check write permissions.
Returns
bool True, if the user has write permissions, false otherwise.

Implements Event.

◆ sendParticipationStatus()

sendParticipationStatus ( )

Sends the participation status of the calendar the date is assigned to. This is only done for user calendars and not for course calendars.

Returns
void

◆ toEventData()

toEventData ( string  $user_id)

Returns a JSON-encoded fullcalendar event object that represents the event.

Parameters
$user_idstring The user for which to generate the fullcalendar event.
Returns
The EventData representation of the event.

Implements Event.

Field Documentation

◆ $suppress_mails

$suppress_mails = false

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