|
static | countByRange (Range $range, $expired=false) |
|
static | findByRange (Range $range, $order='', $expired=false) |
|
static | findOccupiedSlotsByUserAndRange ($user_id, Range $range) |
|
static | isSlotEvent (CalendarDate $event) |
|
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 | setMariadbDefaultColumnFix (bool $state=true) |
|
◆ __toString()
- Returns
- string A string representation of the consultation slot.
◆ configure()
static configure |
( |
|
$config = [] | ) |
|
|
staticprotected |
Configures the model.
- Parameters
-
array | $config | Configuration |
◆ countByRange()
static countByRange |
( |
Range |
$range, |
|
|
|
$expired = false |
|
) |
| |
|
static |
Counts all slots of the given range.
- Parameters
-
- Returns
- int
◆ createEvent()
createEvent |
( |
User |
$user, |
|
|
string |
$type = 'slot' |
|
) |
| |
Creates a Stud.IP calendar event relating to the slot.
- Parameters
-
User | $user | User object to create the event for |
string | $type | Create an event for which type (slot or booking) |
- Returns
- CalendarDate Created event
◆ createEventId()
createEventId |
( |
User |
$user, |
|
|
string |
$type |
|
) |
| |
|
protected |
Returns a unique event id.
- Returns
- string unique event id
◆ findByRange()
static findByRange |
( |
Range |
$range, |
|
|
|
$order = '' , |
|
|
|
$expired = false |
|
) |
| |
|
static |
Finds slots of the given teacher.
- Parameters
-
Range | $range | Range |
string | $order | Desired order of items |
bool | $expired | Show expired items? |
- Returns
- array
◆ findOccupiedSlotsByUserAndRange()
static findOccupiedSlotsByUserAndRange |
( |
|
$user_id, |
|
|
Range |
$range |
|
) |
| |
|
static |
Find all occupied slots for a given user and teacher combination.
- Parameters
-
- Returns
- array
◆ isBookable()
Returns whether the slot is bookable for the given user_id
◆ isLocked()
Returns whether the slot is locked for bookings.
◆ isOccupied()
isOccupied |
( |
|
$user_id = null | ) |
|
Returns whether this slot is occupied (by a given user).
◆ isSlotEvent()
Returns whether the given event is an event for a consultation slot.
◆ updateEvents()
Updates the teacher event that belongs to the slot. This will either be set to be unoccupied, occupied by only one user or by a group of user.
◆ userMayCreateBookingForSlot()
userMayCreateBookingForSlot |
( |
\User |
$user = null | ) |
|
Returns whether the given user may create a booking for this slot.
The documentation for this class was generated from the following file: