|
static | countByRange (Range $range, $expired=false) |
|
static | findByRange (Range $range, $order= '', $expired=false) |
|
static | findOccupiedSlotsByUserAndRange ($user_id, Range $range) |
|
static | tableScheme ($db_table) |
|
static | expireTableScheme () |
|
static | exists ($id) |
|
static | countBySql ($sql= '1', $params=[]) |
|
static | create ($data) |
|
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 ($name, $arguments) |
|
- Returns
- string A string representation of the consultation slot.
static configure |
( |
|
$config = [] | ) |
|
|
staticprotected |
Configures the model.
- Parameters
-
array | $config | Configuration |
static countByRange |
( |
Range |
$range, |
|
|
|
$expired = false |
|
) |
| |
|
static |
Counts all slots of the given range.
- Parameters
-
- Returns
- int
createEvent |
( |
User |
$user | ) |
|
Creates a Stud.IP calendar event relating to the slot.
- Parameters
-
User | $user | User object to create the event for |
- Returns
- EventData Created event
createEventId |
( |
User |
$user | ) |
|
|
protected |
Returns a unique event id.
- Parameters
-
- Returns
- string unique event id
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
static findOccupiedSlotsByUserAndRange |
( |
|
$user_id, |
|
|
Range |
$range |
|
) |
| |
|
static |
Find all occupied slots for a given user and teacher combination.
- Parameters
-
- Returns
- array
Returns whether the slot is locked for bookings.
- Returns
- bool
isOccupied |
( |
|
$user_id = null | ) |
|
Returns whether this slot is occupied (by a given user).
- Parameters
-
mixed | $user_id | Id of the user (optional) |
- Returns
- boolean indicating whether the slot is occupied (by the given user)
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 |
( |
\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: