controllers / timeslots.php
Timeslots
Controller
Timeslots controller schedules player timeslots for shows.
public
delete
(
)
public
delete
(
)
Delete a timeslot by ID. Specify whether or not this is a recurring timeslot. Requires 'manage_timeslots' for the player ID linked to the timeslot.
id |
|
recurring |
public
get
(
)
public
get
(
)
Get timeslot by ID. Requires 'manage_timeslots'.
id |
timeslot
public
get_last_player
(
)
public
get_last_player
(
)
Get the last selected player on the timeslots page for the current user.
player
public
get_recurring
(
)
public
get_recurring
(
)
Get schedule recurring timeslot by ID. Requires 'manage_timeslots'.
id |
timeslot
public
save
(
)
public
save
(
)
Edit or save a timeslot.
id |
Optional when saving a new timeslot. |
edit_recurring |
Boolean specifying whether or not we're editing a recurring show. |
user_id |
|
player_id |
|
mode |
One time, or every X interval. |
x_data |
When mode is set to an interval, x_data specifies every X. |
description |
|
start |
|
duration |
|
stop |
public
search
(
)
public
search
(
)
Get timeslot data between two given date/times. Also used to get timeslot data for provided user. This function is used for the UI/API, but also to detect potential scheduling collisions. Requires 'manage_timeslots' unless requesting information about logged in (i.e. current) user.
start |
|
end |
|
player |
|
user_id |
timeslots
public
set_last_player
(
)
public
set_last_player
(
)
Set the last selected player so we can view timeslots for that player immediately when loading the page again some other time. This will have to be generalized for other UI elements at some point. This is a user-specific setting, so no special permissions are necessary.
player |