helpdesk_type extends deprecated_item
Legacy item deprecated_model class.
Table of Contents
Constants
- META_ACTIONS_ATTACHER = 'attached_by'
- META_ACTIONS_CHANGE_STATUS = 'change_status'
- META_ACTIONS_OPENED = 'opened_by'
- META_ACTIONS_RESPONDED = 'responded_by'
- META_ACTIONS_RESPONDED_INTERNAL = 'responded_internal'
- META_ACTIONS_REVIEWER = 'analyzed_by'
- META_ACTIONS_VIEW_RESPONDED_INTERNAL = 'view_responded_internal'
- META_ACTIONS_VIEWED = 'viewed_by'
- PERPAGE = 50
- STATUS_ACTIVE = 'active'
- STATUS_CANCELED = 'canceled'
- STATUS_COMPLETED = 'completed'
- STATUS_DELETED = 'deleted'
- STATUS_DISABLED = 'disabled'
- STATUS_DISAPPROVED = 'disapproved'
- STATUS_ENABLED = 'enabled'
- STATUS_EXPIRED = 'expired'
- STATUS_FAILED = 'failed'
- STATUS_FINISH = 'finish'
- STATUS_INACTIVE = 'inactive'
- STATUS_INPROGRESS = 'inprogress'
- STATUS_NEW = 'new'
- STATUS_PAUSED = 'paused'
- STATUS_PLAYED = 'played'
- STATUS_SYNC = 'sync'
- TYPE = 'helpdesk_type'
Properties
- $contextid : mixed
- $courseid : mixed
- $description : mixed
- $descriptionformat : mixed
- $enable_attached : mixed
- $enable_authorization : mixed
- $enable_custom_actions : mixed
- $enable_responded_internal : mixed
- $fullname : mixed
- $guid : mixed
- $id : mixed
- $idnumber : mixed
- $link_another_user : mixed
- $parent : mixed
- $shortname : mixed
- $sortorder : mixed
- $status : mixed
- $timecreated : mixed
- $timemodified : mixed
- $type : mixed
- $userid : mixed
- $usermodified : mixed
- $version : mixed
- $visible : mixed
- $fillable : mixed
- $table : mixed
- $table_metadata : mixed
Methods
- __clone() : mixed
- __construct() : mixed
- Helpdesk type constructor.
- activate_or_deactivate() : void
- Activate or deactivate helpdesk type.
- all() : array<string|int, mixed>
- can_add_responded_internal() : bool
- Can view responded_internal.
- can_attached() : bool
- Can attached files.
- can_authorization() : bool|null
- can_change_request_status() : bool
- Can change request status.
- can_linked_user() : bool
- can_reply() : bool
- Can reply request.
- can_view_responded_internal() : bool
- Can view internal reply.
- create_or_update() : void
- Create or update helpdesk type.
- delete() : bool
- deleted() : bool
- disabled() : bool
- enabled() : bool
- get_all_metadata() : array<string, mixed>
- get_all_request_status() : mixed
- Get all request status.
- get_display_status() : string
- Get display status.
- get_file() : mixed
- Get file associated with the model.
- get_fileurl() : mixed
- Get file URL.
- get_item_or_create() : deprecated_item
- Factory method to get existing or create a new item.
- get_items() : array<string|int, deprecated_item>
- get_items_by_metadata() : array<string|int, mixed>
- get_meta() : mixed
- Get metadata value by key.
- get_meta_capabilities() : array<string|int, mixed>
- Get all meta capabilities/actions.
- get_path() : string|null
- get_records() : array<string|int, deprecated_model_interface>
- get_request_type_workflow() : object|null
- Get request type workflow instance.
- get_request_types_by_current_user_capability() : array<int, mixed>
- Get request types by current user capability.
- get_role_actions() : array<string|int, mixed>
- Get allowed actions for each role.
- get_table() : string|null
- get_table_metadata() : string
- get_workflow_name() : mixed
- get workflow name.
- load() : void
- save_custom_actions() : void
- Save custom actions.
- save_custom_fields() : bool
- Save custom fields.
- set_meta() : void
- Set metadata key-value pair.
- set_metas() : void
- Set multiple metadata key-value pairs.
- update() : static
- Update the model with form data.
- url_generator() : moodle_url
- Generate a URL based on the Symfony route name and parameters.
- webhook_url_generator() : moodle_url
- Generate a webhook URL.
- from_record() : static
- get() : false|mixed|stdClass
- Get record by ID.
- get_by_idnumber() : false|mixed|stdClass
- Get record by idnumber.
- save() : mixed
- can_reply_after_request_completion() : bool|null
Constants
META_ACTIONS_ATTACHER
public
mixed
META_ACTIONS_ATTACHER
= 'attached_by'
META_ACTIONS_CHANGE_STATUS
public
mixed
META_ACTIONS_CHANGE_STATUS
= 'change_status'
META_ACTIONS_OPENED
public
mixed
META_ACTIONS_OPENED
= 'opened_by'
META_ACTIONS_RESPONDED
public
mixed
META_ACTIONS_RESPONDED
= 'responded_by'
META_ACTIONS_RESPONDED_INTERNAL
public
mixed
META_ACTIONS_RESPONDED_INTERNAL
= 'responded_internal'
META_ACTIONS_REVIEWER
public
mixed
META_ACTIONS_REVIEWER
= 'analyzed_by'
META_ACTIONS_VIEW_RESPONDED_INTERNAL
public
mixed
META_ACTIONS_VIEW_RESPONDED_INTERNAL
= 'view_responded_internal'
META_ACTIONS_VIEWED
public
mixed
META_ACTIONS_VIEWED
= 'viewed_by'
PERPAGE
public
mixed
PERPAGE
= 50
STATUS_ACTIVE
public
mixed
STATUS_ACTIVE
= 'active'
STATUS_CANCELED
public
mixed
STATUS_CANCELED
= 'canceled'
STATUS_COMPLETED
public
mixed
STATUS_COMPLETED
= 'completed'
STATUS_DELETED
public
mixed
STATUS_DELETED
= 'deleted'
STATUS_DISABLED
public
mixed
STATUS_DISABLED
= 'disabled'
STATUS_DISAPPROVED
public
mixed
STATUS_DISAPPROVED
= 'disapproved'
STATUS_ENABLED
public
mixed
STATUS_ENABLED
= 'enabled'
STATUS_EXPIRED
public
mixed
STATUS_EXPIRED
= 'expired'
STATUS_FAILED
public
mixed
STATUS_FAILED
= 'failed'
STATUS_FINISH
public
mixed
STATUS_FINISH
= 'finish'
STATUS_INACTIVE
public
mixed
STATUS_INACTIVE
= 'inactive'
STATUS_INPROGRESS
public
mixed
STATUS_INPROGRESS
= 'inprogress'
STATUS_NEW
public
mixed
STATUS_NEW
= 'new'
STATUS_PAUSED
public
mixed
STATUS_PAUSED
= 'paused'
STATUS_PLAYED
public
mixed
STATUS_PLAYED
= 'played'
STATUS_SYNC
public
mixed
STATUS_SYNC
= 'sync'
TYPE
public
mixed
TYPE
= 'helpdesk_type'
Properties
$contextid
public
mixed
$contextid
$courseid
public
mixed
$courseid
$description
public
mixed
$description
$descriptionformat
public
mixed
$descriptionformat
= 0
$enable_attached
public
mixed
$enable_attached
$enable_authorization
public
mixed
$enable_authorization
$enable_custom_actions
public
mixed
$enable_custom_actions
$enable_responded_internal
public
mixed
$enable_responded_internal
$fullname
public
mixed
$fullname
$guid
public
mixed
$guid
$id
public
mixed
$id
$idnumber
public
mixed
$idnumber
$link_another_user
public
mixed
$link_another_user
$parent
public
mixed
$parent
$shortname
public
mixed
$shortname
$sortorder
public
mixed
$sortorder
= 0
$status
public
mixed
$status
$timecreated
public
mixed
$timecreated
= 0
$timemodified
public
mixed
$timemodified
= 0
$type
public
mixed
$type
$userid
public
mixed
$userid
$usermodified
public
mixed
$usermodified
$version
public
mixed
$version
$visible
public
mixed
$visible
= 1
$fillable
protected
mixed
$fillable
= ['category', 'enable_priority', 'enable_sla', 'document_template', 'standard_responses', 'enable_escalation', 'enable_feedback', 'assignee', 'roles', 'profile_fields', 'enable_authorization', 'required_description_field', 'required_fullname_field', 'link_another_user', 'require_link_another_user', 'enable_responded_internal', 'enable_attached', 'user_fields', 'custom_fields', 'additional_fields', 'course_selection', 'enable_custom_actions', 'opened_by', 'viewed_by', 'responded_by', 'responded_internal', 'view_responded_internal', 'change_status', 'analyzed_by', 'attached_by']
$table
protected
mixed
$table
= 'middag_items'
$table_metadata
protected
mixed
$table_metadata
= 'middag_itemmeta'
Methods
__clone()
public
__clone() : mixed
__construct()
Helpdesk type constructor.
public
__construct([null|int $id = null ]) : mixed
Parameters
- $id : null|int = null
activate_or_deactivate()
Activate or deactivate helpdesk type.
public
activate_or_deactivate() : void
all()
public
all() : array<string|int, mixed>
Return values
array<string|int, mixed>can_add_responded_internal()
Can view responded_internal.
public
can_add_responded_internal() : bool
Return values
boolcan_attached()
Can attached files.
public
can_attached() : bool
Return values
boolcan_authorization()
public
can_authorization(mixed $helpdesk_request) : bool|null
Parameters
- $helpdesk_request : mixed
Return values
bool|nullcan_change_request_status()
Can change request status.
public
can_change_request_status() : bool
Return values
boolcan_linked_user()
public
can_linked_user() : bool
Return values
boolcan_reply()
Can reply request.
public
can_reply(helpdesk_request $request) : bool
Parameters
- $request : helpdesk_request
Return values
boolcan_view_responded_internal()
Can view internal reply.
public
can_view_responded_internal() : bool
Return values
boolcreate_or_update()
Create or update helpdesk type.
public
create_or_update(mixed $formdata) : void
Parameters
- $formdata : mixed
delete()
public
delete() : bool
Return values
booldeleted()
public
deleted() : bool
Tags
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_all_request_status()
Get all request status.
public
get_all_request_status() : mixed
get_display_status()
Get display status.
public
get_display_status() : string
Return values
stringget_file()
Get file associated with the model.
public
get_file(mixed $context, mixed $component, mixed $filearea[, mixed $validimage = false ]) : mixed
Parameters
- $context : mixed
- $component : mixed
- $filearea : mixed
- $validimage : mixed = false
Tags
get_fileurl()
Get file URL.
public
static get_fileurl(mixed $file) : mixed
Parameters
- $file : mixed
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 = '' ]) : deprecated_item
Parameters
- $contextid : null|int|string
- $type : string = ''
Tags
Return values
deprecated_itemget_items()
public
get_items(mixed $searchcriteria, mixed $page, mixed &$totalcount[, mixed $sort = '' ][, mixed $includedeleted = false ][, mixed $perpage = 0 ]) : array<string|int, deprecated_item>
Parameters
- $searchcriteria : mixed
- $page : mixed
- $totalcount : mixed
- $sort : mixed = ''
- $includedeleted : mixed = false
- $perpage : mixed = 0
Tags
Return values
array<string|int, deprecated_item>get_items_by_metadata()
public
get_items_by_metadata(array<string|int, mixed> $searchcriteriaitem, array<string|int, mixed> $searchcriteriameta, int $page, int &$totalcount[, null|string $sort = '' ][, bool $includedeleted = false ][, int $perpage = 0 ]) : array<string|int, mixed>
Migrate to core\repository\item_search_repository
Parameters
- $searchcriteriaitem : array<string|int, mixed>
- $searchcriteriameta : array<string|int, mixed>
- $page : int
- $totalcount : int
- $sort : null|string = ''
- $includedeleted : bool = false
- $perpage : int = 0
Tags
Return values
array<string|int, mixed>get_meta()
Get metadata value by key.
public
get_meta(mixed $meta_key) : mixed
Parameters
- $meta_key : mixed
Tags
get_meta_capabilities()
Get all meta capabilities/actions.
public
static get_meta_capabilities() : array<string|int, mixed>
Return values
array<string|int, mixed>get_path()
public
get_path() : string|null
Return values
string|nullget_records()
public
get_records(mixed $searchcriteria, mixed $page, mixed &$totalcount[, mixed $sort = '' ][, mixed $perpage = 0 ]) : array<string|int, deprecated_model_interface>
Parameters
- $searchcriteria : mixed
- $page : mixed
- $totalcount : mixed
- $sort : mixed = ''
- $perpage : mixed = 0
Tags
Return values
array<string|int, deprecated_model_interface>get_request_type_workflow()
Get request type workflow instance.
public
get_request_type_workflow() : object|null
Return values
object|nullget_request_types_by_current_user_capability()
Get request types by current user capability.
public
get_request_types_by_current_user_capability() : array<int, mixed>
Return values
array<int, mixed>get_role_actions()
Get allowed actions for each role.
public
get_role_actions() : array<string|int, mixed>
Return values
array<string|int, mixed>get_table()
public
get_table() : string|null
Return values
string|nullget_table_metadata()
public
get_table_metadata() : string
Return values
stringget_workflow_name()
get workflow name.
public
get_workflow_name() : mixed
load()
public
load([mixed $reload = false ]) : void
Parameters
- $reload : mixed = false
save_custom_actions()
Save custom actions.
public
save_custom_actions(mixed $formdata, mixed $enable_custom_actions) : void
Parameters
- $formdata : mixed
- $enable_custom_actions : mixed
save_custom_fields()
Save custom fields.
public
static save_custom_fields(mixed $formdata) : bool
Parameters
- $formdata : mixed
Return values
boolset_meta()
Set metadata key-value pair.
public
set_meta(mixed $meta_key, mixed $meta_value) : void
Parameters
- $meta_key : mixed
- $meta_value : mixed
Tags
set_metas()
Set multiple metadata key-value pairs.
public
set_metas(array<string, mixed> $metas) : void
Parameters
- $metas : array<string, mixed>
update()
Update the model with form data.
public
update([array<string, mixed> $formdata = [] ]) : static
Parameters
- $formdata : array<string, mixed> = []
Return values
staticurl_generator()
Generate a URL based on the Symfony route name and parameters.
public
static url_generator(string $route[, array<string|int, mixed> $parameters = [] ][, int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH ]) : moodle_url
Parameters
- $route : string
- $parameters : array<string|int, mixed> = []
- $referenceType : int = UrlGeneratorInterface::ABSOLUTE_PATH
Return values
moodle_urlwebhook_url_generator()
Generate a webhook URL.
public
static webhook_url_generator(string $route[, array<string|int, mixed> $parameters = [] ][, int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH ]) : moodle_url
Parameters
- $route : string
- $parameters : array<string|int, mixed> = []
- $referenceType : int = UrlGeneratorInterface::ABSOLUTE_PATH
Return values
moodle_urlfrom_record()
protected
static from_record(stdClass $r) : static
Parameters
- $r : stdClass
Return values
staticget()
Get record by ID.
protected
get(mixed $id) : false|mixed|stdClass
Parameters
- $id : mixed
Tags
Return values
false|mixed|stdClassget_by_idnumber()
Get record by idnumber.
protected
get_by_idnumber(mixed $idnumber) : false|mixed|stdClass
Parameters
- $idnumber : mixed
Tags
Return values
false|mixed|stdClasssave()
protected
save() : mixed
can_reply_after_request_completion()
private
can_reply_after_request_completion() : bool|null