Stud.IP
6.0
|
Static Public Member Functions | |
static | find ($id) |
static | findByTimestamp ($timestamp) |
static | findNext ($timestamp=null) |
static | findPrevious ($timestamp=null) |
static | findCurrent () |
static | findAllVisible ($with_before_first=true) |
static | getAll ($force_reload=false) |
static | getAllAsArray ($with_before_first=true, $force_reload=false) |
static | getIndexById ($semester_id, $with_before_first=true, $only_visible=false) |
static | getSemesterSelector ( $select_attributes=null, $default=0, $option_value='semester_id', $include_all=true) |
static | getSemChangeDate ($semester) |
static | findDefault () |
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) |
Protected Member Functions | |
seminarCounter ($field) | |
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) | |
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) |
Protected Attributes | |
$seminar_counts = null | |
Protected Attributes inherited from SimpleORMap | |
$content = [] | |
$content_db = [] | |
$is_new = true | |
$is_deleted = false | |
$relations = [] | |
$additional_data = [] | |
string | $i18n_class = I18NString::class |
Additional Inherited Members | |
Data Fields inherited from SimpleORMap | |
const | ID_SEPARATOR = '_' |
Static Public Attributes inherited from SimpleORMap | |
static | $schemes = null |
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 |
|
staticprotected |
Configures this model.
array | $config |
|
static |
returns semester object for given id or null
string | $id |
|
static |
Return a specially orderd array of all semesters
|
static |
|
static |
returns current Semester
|
static |
|
static |
|
static |
Returns the previous semester for a semester specified by a timestamp. If no timestamp is specified, the previous semester of the current semester is returned.
integer | null | $timestamp | The timestamp of the semester whose predecessor shall be found. Defaults to null. |
|
static |
returns array of all existing semester objects orderd by begin
boolean | $force_reload |
Returns a list of all semesters as array, optionally with an entry at the beginning that represents the time before the first semester in the system.
boolean | $with_before_first | Show the optional first entry as described above |
boolean | $force_reload |
getCorrectedLectureBegin | ( | ) |
Returns the corrected begin of lectures which ensures that the begin is always on a monday.
getFirstSemesterWeek | ( | ) |
Returns the calendar week number of the first week of the lecture period.
returns the index for a given semester id, in an array returned from self::getAllAsArray(), beware of second parameter
$semester_id | ||
bool | $with_before_first | |
bool | $only_visible |
getLastSemesterWeek | ( | ) |
Returns the calendar week number of the last week of the lecture period.
|
static |
|
static |
Returns an html fragment with a semester select-box
array | $select_attributes | |
integer | $default | |
string | $option_value | |
boolean | $include_all |
getSemWeekNumber | ( | $timestamp | ) |
returns "Semesterwoche" for a given timestamp
integer | $timestamp |
getStartWeeks | ( | ?Semester | $end_semester = null | ) |
Returns the start week dates for this semester (and other semesters if $end_semester is given).
Semester | $end_semester | end semester, default is $this |
isCurrent | ( | ) |
Returns whether this semester is the current semester.
isPast | ( | ) |
Return whether this semester is in the past.
refreshCache | ( | ) |
Flushes the cache just after storing and deleting a semester
|
protected |
Counts the number of different seminar types in this semester. This method caches the result in $seminar_counts so the db will only be queried once per semester.
String | $field | Name of the seminar (/additional_fields) type |
toArray | ( | $only_these_fields = null | ) |
Returns an array representation of this semester.
mixed | $only_these_fields | List of fields to extract |
|
protected |
Caches seminar counts