models / shows_model.php
ShowsModel
Model
Manages schedules and shows.
public
collision_timeslot_check
(
data, id = false, skip_timeslot_check = false
)
public
collision_timeslot_check
(
data, id = false, skip_timeslot_check = false
)
Check if this collides with another scheduled item (excluding item with id = $id).
Parameters
data |
|
id |
Item to exclude. Default FALSE. |
Returns
[is_colliding, msg]
public
delete_show
(
id
)
public
delete_show
(
id
)
Delete a show by ID.
Parameters
id |
public
get_show_by_id
(
id
)
public
get_show_by_id
(
id
)
Get a show by ID.
Parameters
id |
Returns
show
public
get_shows
(
start, end, player, not_entry = false
)
public
get_shows
(
start, end, player, not_entry = false
)
Get shows scheduled on a player.
Parameters
start |
|
end |
|
player |
|
not_entry |
Exclude a specific entry from search. Default FALSE. |
Returns
shows
private
order_show
(
a, b
)
private
order_show
(
a, b
)
Private method to get the order of two schedules. Return 1 if A starts after B, -1 otherwise.
Parameters
a |
|
b |
Returns
1|-1
public
save_show
(
data, id = false
)
public
save_show
(
data, id = false
)
Save a show.
Parameters
data |
|
id |
Set when updating an existing show. Unset by default. |
public
validate_show
(
data, id = false, skip_permission_check = false
)
public
validate_show
(
data, id = false, skip_permission_check = false
)
Validate a show
Parameters
data |
|
id |
Set when updating existing show. Default FALSE. |
Returns
[is_valid, msg]