Stud.IP  5.4
CalendarDate Class Reference
Inheritance diagram for CalendarDate:
SimpleORMap PrivacyObject

Public Member Functions

 getDefaultValue ($field)
 cbSendDateModificationMail ()
 cbGenerateUniqueId ()
 isVisible (string $range_id)
 isWritable (string $range_id)
 isWholeDay ()
 calculateExpiration ()
 getRepetitionInterval ()
 getRepetitionOffset ()
 clearRepetitionFields ()
 getAccessAsString ()
 getRepetitionAsString ()
 getRepetitionInputHtml (string $element_name='repetition')
 getCategoryAsString ()
 getOrdinalName ()
 getWeekdayName (int $offset=0)
 getVisibilityAsString ()
 getParticipantsAsStringArray (string $user_id='')
- 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 garbageCollect ()
static exportUserData (StoredUserData $storage)
- 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)

Data Fields

const NEVER_ENDING = 2147483647
- 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

◆ calculateExpiration()

calculateExpiration ( )

Calculates the value of the "expire" column in case the CalendarDate object has a repetition defined.


◆ cbGenerateUniqueId()

cbGenerateUniqueId ( )

Generates an unique id if it isn't present.


◆ cbSendDateModificationMail()

cbSendDateModificationMail ( )

◆ clearRepetitionFields()

clearRepetitionFields ( )

This is a helper method to set all the fields for date repetition to an empty string.


◆ configure()

static configure (   $config = [])

◆ exportUserData()

static exportUserData ( StoredUserData  $storage)

Export available data of a given user into a storage object (an instance of the StoredUserData class) for that user.

StoredUserData$storageobject to store data into

Implements PrivacyObject.

◆ garbageCollect()

static garbageCollect ( )

◆ getAccessAsString()

getAccessAsString ( )

◆ getCategoryAsString()

getCategoryAsString ( )

◆ getDefaultValue()

getDefaultValue (   $field)

◆ getOrdinalName()

getOrdinalName ( )

Returns the textual ordinal for the offset of a weekday from property offset or an empty string if offset is not set.

string The textual ordinal.

◆ getParticipantsAsStringArray()

getParticipantsAsStringArray ( string  $user_id = '')

Returns the names of the participants of the date. This also includes courses to which the date is assigned.

string$user_idThe user for which to generate the participant array. The user with that ID is excluded from that list.
array A list with the names of the participants of the date.

◆ getRepetitionAsString()

getRepetitionAsString ( )

◆ getRepetitionInputHtml()

getRepetitionInputHtml ( string  $element_name = 'repetition')

Creates the HTML for creating a repetition input Vue component instance and fills it with the values from the model.

string$element_nameThe name of the element.
string The HTML code for creating the repetition input vue instance.

◆ getRepetitionInterval()

getRepetitionInterval ( )

Returns the DateInterval for the repetition of this calendar date.

DateInterval|null The DateInterval for this calendar date or null in case the date has no repetition.
ExceptionIn case a DateInterval cannot be constructed.

◆ getRepetitionOffset()

getRepetitionOffset ( )

◆ getVisibilityAsString()

getVisibilityAsString ( )

Returns a string representation of the access field.

string A localised string of the access field.

◆ getWeekdayName()

getWeekdayName ( int  $offset = 0)

Returns the short name of first weekday from property days or an empty string if days is not set.

$offsetint Offset of days.
string Short name of weekday.

◆ isVisible()

isVisible ( string  $range_id)



◆ isWholeDay()

isWholeDay ( )

Determines whether the date spans over one whole day. This means that the date takes place on one day from 0:00:00 to 23:59:59.

bool True, if the date spans over the whole day, false otherwise.

◆ isWritable()

isWritable ( string  $range_id)

Field Documentation


const NEVER_ENDING = 2147483647

NEVER_ENDING represents the value of the repetition_end field for a date that never ends. The value is the result of computing 2 ^ 31 - 1.

NOTE: This constant must be changed long before 2038-01-19 03:14:07 UTC or else dates that should end at some specific point in time may end never.

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