deprecated_item_interface extends deprecated_model_interface
Contract for deprecated item deprecated_model.
Extends model_interface and adds item-specific API.
Table of Contents
Constants
- TYPE = 'item'
Methods
- delete() : bool
- deleted() : bool
- disabled() : bool
- enabled() : bool
- get_all_metadata() : array<string, mixed>
- get_file() : mixed
- get_fileurl() : mixed
- get_item_or_create() : mixed
- Factory method to get existing or create a new item.
- get_items() : array<int, mixed>
- get_meta() : mixed
- get_path() : string|null
- get_records() : array<int, mixed>
- get_table() : string|null
- get_table_metadata() : string
- load() : void
- set_meta() : void
- set_metas() : void
- update() : static
Constants
TYPE
public
mixed
TYPE
= 'item'
Methods
delete()
public
delete() : bool
Return values
booldeleted()
public
deleted() : bool
Return values
booldisabled()
public
disabled() : bool
Return values
boolenabled()
public
enabled() : bool
Return values
boolget_all_metadata()
public
get_all_metadata() : array<string, mixed>
Return values
array<string, mixed>get_file()
public
get_file(object $context, string $component, string $filearea[, bool $validimage = false ]) : mixed
Parameters
- $context : object
- $component : string
- $filearea : string
- $validimage : bool = false
get_fileurl()
public
static get_fileurl(object $file) : mixed
Parameters
- $file : object
get_item_or_create()
Factory method to get existing or create a new item.
public
static get_item_or_create(null|int|string $contextid[, string $type = '' ]) : mixed
Parameters
- $contextid : null|int|string
- $type : string = ''
get_items()
public
get_items(array<string, mixed> $searchcriteria, int $page, int &$totalcount, string $sort, bool $includedeleted, int $perpage) : array<int, mixed>
Parameters
- $searchcriteria : array<string, mixed>
- $page : int
- $totalcount : int
- $sort : string
- $includedeleted : bool
- $perpage : int
Return values
array<int, mixed>get_meta()
public
get_meta(string $meta_key) : mixed
Parameters
- $meta_key : string
get_path()
public
get_path() : string|null
Return values
string|nullget_records()
public
get_records(array<string, mixed> $searchcriteria, int $page, int &$totalcount, string $sort, int $perpage) : array<int, mixed>
Parameters
- $searchcriteria : array<string, mixed>
- $page : int
- $totalcount : int
-
Output parameter
- $sort : string
- $perpage : int
Return values
array<int, mixed>get_table()
public
get_table() : string|null
Return values
string|nullget_table_metadata()
public
get_table_metadata() : string
Return values
stringload()
public
load([bool $reload = false ]) : void
Parameters
- $reload : bool = false
set_meta()
public
set_meta(string $meta_key, mixed $meta_value) : void
Parameters
- $meta_key : string
- $meta_value : mixed
set_metas()
public
set_metas(array<string, mixed> $metas) : void
Parameters
- $metas : array<string, mixed>
update()
public
update(array<string, mixed> $formdata) : static
Parameters
- $formdata : array<string, mixed>