models / mediagenres_model.php
MediaGenresModel
Model
Secondary model for managing media genres.
public
delete
(
id
)
public
delete
(
id
)
Delete a genre.
Parameters
id |
public
get_by_id
(
id
)
public
get_by_id
(
id
)
Get information about a genre by ID.
Parameters
id |
Returns
[id, name, description, media_category_id]
public
save
(
data, id=false
)
public
save
(
data, id=false
)
Save a media genre.
Parameters
data |
|
id |
Optional. Specified when updating a pre-existing genre. |
public
search
(
filters, orderby, orderdesc, limit, offset
)
public
search
(
filters, orderby, orderdesc, limit, offset
)
Search media genres.
Parameters
filters |
|
orderby |
|
orderdesc |
|
limit |
|
offset |
Returns
genres
public
validate
(
data, id=false
)
public
validate
(
data, id=false
)
Validate a genre before updating.
Parameters
data |
|
id |
Optional. Specified when updating a pre-existing genre. |
Returns
is_valid