|
Stud.IP
jlu_4.3 Revision 64286
|


Public Member Functions | |
| createSlots ($duration) | |
| isVisibleForUser ($user_id=null) | |
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) | |
| 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 | findVisibleForUserByTeacherId ($user_id, $teacher_id, $course_id=null, $order='') |
| static | countVisibleForUserByTeacherId ($user_id, $teacher_id, $course_id=null) |
| static | findVisibleCoursesForUserByTeacherId ($user_id, $teacher_id) |
| static | existForTeacherAndUser ($teacher_id, $user_id) |
| static | generateBlocks ($user_id, $start, $end, $week_day, $interval) |
| static | exportUserData (StoredUserData $storage) |
| static | findByTeacher_id ($teacher_id, $order='', $expired=false) |
| static | countByTeacher_id ($teacher_id, $expired=false) |
Static Public Member Functions inherited from SimpleORMap | |
| static | tableScheme ($db_table) |
| static | expireTableScheme () |
| static | find ($id) |
| static | exists ($id) |
| static | countBySql ($sql=1, $params=array()) |
| static | create ($data) |
| static | build ($data, $is_new=true) |
| static | buildExisting ($data) |
| static | import ($data) |
| static | findBySQL ($sql, $params=array()) |
| static | findOneBySQL ($where, $params=array()) |
| static | findThru ($foreign_key_value, $options) |
| static | findEachBySQL ($callable, $sql, $params=array()) |
| static | findMany ($pks=array(), $order='', $order_params=array()) |
| static | findEachMany ($callable, $pks=array(), $order='', $order_params=array()) |
| static | findAndMapBySQL ($callable, $where, $params=array()) |
| static | findAndMapMany ($callable, $pks=array(), $order='', $order_params=array()) |
| static | deleteBySQL ($where, $params=array()) |
| static | toObject ($id_or_object) |
| static | __callStatic ($name, $arguments) |
| static | exportUserData (StoredUserData $storage) |
Static Protected Member Functions | |
| static | configure ($config=[]) |
| static | checkOverlaps ($user_id, $start, $end) |
Static Protected Member Functions inherited from SimpleORMap | |
| static | configure ($config=array()) |
| static | config ($key) |
Additional Inherited Members | |
Data Fields inherited from SimpleORMap | |
| const | ID_SEPARATOR = '_' |
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) | |
| registerCallback ($types, $cb) | |
| unregisterCallback ($types, $cb) | |
| cbAutoIncrementColumn ($type) | |
| cbAutoKeyCreation () | |
| cbNotificationMapper ($cb_type) | |
| cbAfterInitialize ($cb_type) | |
| setSerializedValue ($field, $value) | |
| setI18nValue ($field, $value) | |
| cbI18N ($type) | |
Protected Attributes inherited from SimpleORMap | |
| $content = array() | |
| $content_db = array() | |
| $is_new = true | |
| $is_deleted = false | |
| $db_table = '' | |
| $db_fields = null | |
| $pk = null | |
| $default_values = array() | |
| $serialized_fields = array() | |
| $alias_fields = array() | |
| $i18n_fields = array() | |
| $additional_fields = array() | |
| $relations = array() | |
| $has_many = array() | |
| $has_one = array() | |
| $belongs_to = array() | |
| $has_and_belongs_to_many = array() | |
| $registered_callbacks = array() | |
| $known_slots = array() | |
| $notification_map = array() | |
| $additional_data = array() | |
| $getter_setter_map = array() | |
Static Protected Attributes inherited from SimpleORMap | |
| static | $config = array() |
| static | $reserved_slots = array('value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id') |
|
staticprotected |
Checks if there any consultation slots already exist in the given time range for the given user.
| string | $user_id | Id of the user |
| int | $start | Start of the time range as unix timestamp |
| int | $end | End of the time range as unix timestamp |

|
staticprotected |
Configures the model.
| array | $config | Configuration |
Reimplemented from SimpleORMap.

|
static |
Count all blocks of a teacher. Specialized version of the sorm method that excludes expired blocks by default and may be used to explicitely select expired blocks.
| string | $teacher_id | Id of the teacher |
| boolean | $expired | Select expired blocks |

|
static |
| createSlots | ( | $duration | ) |
Creates individual slots according to the defined data and given duration.
| int | $duration | Duration of a slot in minutes |
|
static |
Returns whether any blocks of a teacher exist that should be visible for the given user.
| string | $teacher_id | User id of the teacher |
| string | $user_id | Id of the user |


|
static |
Export available data of a given user into a storage object (an instance of the StoredUserData class) for that user.
| StoredUserData | $storage | object to store data into |
Implements PrivacyObject.

|
static |
Finds all blocks of a teacher. Specialized version of the sorm method that excludes expired blocks by default and may be used to explicitely select expired blocks.
| string | $teacher_id | Id of the teacher |
| string | $order | Optional order |
| boolean | $expired | Select expired blocks |

|
static |
|
static |
Find only visible blocks for user.
| string | $user_id | User id to check the visibility for |
| string | $teacher_id | User id of the teacher |
| string | null | $course_id | Optional course id to filter blocks by |
| string | $order | Optional order clause |


|
static |
Generate blocks according to the given data.
Be aware, that this is an actual generator that yields the results. You cannot count the generated blocks without iterating over them.
| OverlapException |
| string | $user_id | Id of the user |
| int | $start | Start of the time range as unix timestamp |
| int | $end | End of the time range as unix timestamp |
| int | $week_day | Day of the week the blocks should be created (0 = sunday, 1 = monday ...) |
| int | $interval | Week interval (skip $interval weeks between blocks) |


| isVisibleForUser | ( | $user_id = null | ) |
Returns whether this slot is visible for a user.
| mixed | $user_id | Id of the user (optional, defaults to current user) |