automessage_template extends deprecated_item
Legacy item deprecated_model class.
Table of Contents
Constants
- FILEMANAGEROPTIONS_ATTACHMENT = ['maxbytes' => 1024, 'subdirs' => 0, 'maxfiles' => 1, 'accepted_types' => '*']
- 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'
- TRIGGER_EVENT = 'event'
- TRIGGER_EVENT_EACH = 2
- TRIGGER_EVENT_FIRST = 1
- TRIGGER_INTERVAL = 'interval'
- TRIGGER_INTERVAL_LIMIT_30_DAYS = 30
- TRIGGER_INTERVAL_LIMIT_60_DAYS = 60
- TRIGGER_INTERVAL_LIMIT_90_DAYS = 90
- TRIGGER_INTERVAL_LIMIT_EACH = 2
- TRIGGER_INTERVAL_LIMIT_FIRST = 1
- TRIGGER_INTERVAL_REPEAT_DAILY = 1
- TRIGGER_INTERVAL_REPEAT_WEEKLY = 2
- TRIGGER_INTERVAL_REPEAT_YEARLY = 4
- TRIGGER_MANUAL = 'manual'
- TRIGGER_RELATIVEDATE = 'relativedate'
- TRIGGER_RELATIVEDATE_AFTER_COURSE_ENDDATE = 4
- TRIGGER_RELATIVEDATE_AFTER_COURSE_STARTDATE = 2
- TRIGGER_RELATIVEDATE_AFTER_ENROL_ENDDATE = 8
- TRIGGER_RELATIVEDATE_AFTER_ENROL_STARTDATE = 6
- TRIGGER_RELATIVEDATE_BEFORE_COURSE_ENDDATE = 3
- TRIGGER_RELATIVEDATE_BEFORE_COURSE_STARTDATE = 1
- TRIGGER_RELATIVEDATE_BEFORE_ENROL_ENDDATE = 7
- TRIGGER_RELATIVEDATE_BEFORE_ENROL_STARTDATE = 5
- TRIGGER_RUNONCE = 'runonce'
- TYPE = 'automessage_template'
Properties
- $automessage_trigger : mixed
- $contextid : mixed
- $courseid : mixed
- $description : mixed
- $descriptionformat : mixed
- $filter : mixed
- $fullname : mixed
- $guid : mixed
- $id : mixed
- $idnumber : mixed
- $lasttrigger : mixed
- $nexttrigger : mixed
- $parent : mixed
- $sendtype : array<string|int, string>
- $shortname : string
- $sortorder : mixed
- $status : mixed
- $timecreated : mixed
- $timemodified : mixed
- $triggerconfig : mixed
- $triggerconfigevent : mixed
- $triggerconfigeventcontexts : mixed
- $triggerconfigeventcontextsjson : mixed
- $triggerconfigeventrepeat : mixed
- $triggerconfigintervaleach : mixed
- $triggerconfigintervalenddate : mixed
- $triggerconfigintervaljoinresults : mixed
- $triggerconfigintervallimit : mixed
- $triggerconfigintervalrepeat : mixed
- $triggerconfigintervalstartdate : mixed
- $triggerconfigrelativedatetype : mixed
- $triggerconfigrelativedatevalue : mixed
- $triggertype : mixed
- $type : mixed
- $userid : mixed
- $usermodified : mixed
- $version : mixed
- $visible : int
- $fillable : mixed
- $table : mixed
- $table_metadata : mixed
Methods
- __clone() : mixed
- __construct() : mixed
- Constructor.
- all() : array<string|int, mixed>
- calculate_tolerance_trigger_relativedate() : float|int
- calculate_trigger_interval() : mixed
- check_context() : bool
- check_trigger_event() : bool|null
- clone() : static
- delete() : bool
- deleted() : bool
- disabled() : bool
- display_presend() : mixed
- display_sentype() : string
- display_status() : mixed
- display_trigger() : mixed
- display_trigger_event() : string
- display_trigger_interval_repeats() : string
- display_trigger_relativedate() : string
- enabled() : bool
- filter_trigger_relativedate() : array<string|int, mixed>
- get_all_metadata() : array<string, mixed>
- get_attachments() : array<int, mixed>
- get_automessage_trigger() : mixed
- get_content() : array<string|int, mixed>
- get_contexts_name_trigger_event() : array<string|int, mixed>
- get_contexts_trigger_event() : array<string|int, context>
- 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_options_sendtype() : mixed
- get_options_status() : array<string|int, mixed>|string
- get_options_trigger() : array<string|int, mixed>|string
- get_options_trigger_event() : array<string|int, mixed>|string
- get_options_trigger_interval_limit() : array<string|int, mixed>|string
- get_options_trigger_interval_repeats() : array<string|int, mixed>|string
- get_options_trigger_relativedate() : array<string|int, mixed>|string
- get_path() : string|null
- get_records() : array<string|int, deprecated_model_interface>
- get_table() : string|null
- get_table_metadata() : string
- get_values_trigger_interval_repeats() : array<string|int, mixed>|int
- load() : void
- preview() : array<string|int, mixed>
- save_attachment() : stdClass
- sendtest() : bool
- set_automessage_trigger() : void
- set_meta() : void
- Set metadata key-value pair.
- set_metas() : void
- Set multiple metadata key-value pairs.
- set_trigger_interval() : void
- 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
Constants
FILEMANAGEROPTIONS_ATTACHMENT
public
mixed
FILEMANAGEROPTIONS_ATTACHMENT
= ['maxbytes' => 1024, 'subdirs' => 0, 'maxfiles' => 1, 'accepted_types' => '*']
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'
TRIGGER_EVENT
public
mixed
TRIGGER_EVENT
= 'event'
TRIGGER_EVENT_EACH
public
mixed
TRIGGER_EVENT_EACH
= 2
TRIGGER_EVENT_FIRST
public
mixed
TRIGGER_EVENT_FIRST
= 1
TRIGGER_INTERVAL
public
mixed
TRIGGER_INTERVAL
= 'interval'
TRIGGER_INTERVAL_LIMIT_30_DAYS
public
mixed
TRIGGER_INTERVAL_LIMIT_30_DAYS
= 30
TRIGGER_INTERVAL_LIMIT_60_DAYS
public
mixed
TRIGGER_INTERVAL_LIMIT_60_DAYS
= 60
TRIGGER_INTERVAL_LIMIT_90_DAYS
public
mixed
TRIGGER_INTERVAL_LIMIT_90_DAYS
= 90
TRIGGER_INTERVAL_LIMIT_EACH
public
mixed
TRIGGER_INTERVAL_LIMIT_EACH
= 2
TRIGGER_INTERVAL_LIMIT_FIRST
public
mixed
TRIGGER_INTERVAL_LIMIT_FIRST
= 1
TRIGGER_INTERVAL_REPEAT_DAILY
public
mixed
TRIGGER_INTERVAL_REPEAT_DAILY
= 1
TRIGGER_INTERVAL_REPEAT_WEEKLY
public
mixed
TRIGGER_INTERVAL_REPEAT_WEEKLY
= 2
TRIGGER_INTERVAL_REPEAT_YEARLY
public
mixed
TRIGGER_INTERVAL_REPEAT_YEARLY
= 4
TRIGGER_MANUAL
public
mixed
TRIGGER_MANUAL
= 'manual'
TRIGGER_RELATIVEDATE
public
mixed
TRIGGER_RELATIVEDATE
= 'relativedate'
TRIGGER_RELATIVEDATE_AFTER_COURSE_ENDDATE
public
mixed
TRIGGER_RELATIVEDATE_AFTER_COURSE_ENDDATE
= 4
TRIGGER_RELATIVEDATE_AFTER_COURSE_STARTDATE
public
mixed
TRIGGER_RELATIVEDATE_AFTER_COURSE_STARTDATE
= 2
TRIGGER_RELATIVEDATE_AFTER_ENROL_ENDDATE
public
mixed
TRIGGER_RELATIVEDATE_AFTER_ENROL_ENDDATE
= 8
TRIGGER_RELATIVEDATE_AFTER_ENROL_STARTDATE
public
mixed
TRIGGER_RELATIVEDATE_AFTER_ENROL_STARTDATE
= 6
TRIGGER_RELATIVEDATE_BEFORE_COURSE_ENDDATE
public
mixed
TRIGGER_RELATIVEDATE_BEFORE_COURSE_ENDDATE
= 3
TRIGGER_RELATIVEDATE_BEFORE_COURSE_STARTDATE
public
mixed
TRIGGER_RELATIVEDATE_BEFORE_COURSE_STARTDATE
= 1
TRIGGER_RELATIVEDATE_BEFORE_ENROL_ENDDATE
public
mixed
TRIGGER_RELATIVEDATE_BEFORE_ENROL_ENDDATE
= 7
TRIGGER_RELATIVEDATE_BEFORE_ENROL_STARTDATE
public
mixed
TRIGGER_RELATIVEDATE_BEFORE_ENROL_STARTDATE
= 5
TRIGGER_RUNONCE
public
mixed
TRIGGER_RUNONCE
= 'runonce'
TYPE
public
mixed
TYPE
= 'automessage_template'
Properties
$automessage_trigger
public
mixed
$automessage_trigger
$contextid
public
mixed
$contextid
$courseid
public
mixed
$courseid
$description
public
mixed
$description
$descriptionformat
public
mixed
$descriptionformat
= 0
$filter
public
mixed
$filter
$fullname
public
mixed
$fullname
$guid
public
mixed
$guid
$id
public
mixed
$id
$idnumber
public
mixed
$idnumber
$lasttrigger
public
mixed
$lasttrigger
$nexttrigger
public
mixed
$nexttrigger
$parent
public
mixed
$parent
$sendtype
public
array<string|int, string>
$sendtype
$shortname
public
string
$shortname
$sortorder
public
mixed
$sortorder
= 0
$status
public
mixed
$status
$timecreated
public
mixed
$timecreated
= 0
$timemodified
public
mixed
$timemodified
= 0
$triggerconfig
public
mixed
$triggerconfig
$triggerconfigevent
public
mixed
$triggerconfigevent
$triggerconfigeventcontexts
public
mixed
$triggerconfigeventcontexts
$triggerconfigeventcontextsjson
public
mixed
$triggerconfigeventcontextsjson
$triggerconfigeventrepeat
public
mixed
$triggerconfigeventrepeat
$triggerconfigintervaleach
public
mixed
$triggerconfigintervaleach
$triggerconfigintervalenddate
public
mixed
$triggerconfigintervalenddate
$triggerconfigintervaljoinresults
public
mixed
$triggerconfigintervaljoinresults
$triggerconfigintervallimit
public
mixed
$triggerconfigintervallimit
$triggerconfigintervalrepeat
public
mixed
$triggerconfigintervalrepeat
$triggerconfigintervalstartdate
public
mixed
$triggerconfigintervalstartdate
$triggerconfigrelativedatetype
public
mixed
$triggerconfigrelativedatetype
$triggerconfigrelativedatevalue
public
mixed
$triggerconfigrelativedatevalue
$triggertype
public
mixed
$triggertype
$type
public
mixed
$type
$userid
public
mixed
$userid
$usermodified
public
mixed
$usermodified
$version
public
mixed
$version
$visible
public
int
$visible
$fillable
protected
mixed
$fillable
= ['sendtype', 'filter', 'triggertype', 'triggerconfig', 'lasttrigger', 'nexttrigger', 'triggerconfigevent', 'triggerconfigeventrepeat', 'triggerconfigeventcontextsjson', 'triggerconfigintervalrepeat', 'triggerconfigintervaleach', 'triggerconfigintervalstartdate', 'triggerconfigintervalenddate', 'triggerconfigintervaljoinresults', 'triggerconfigintervallimit', 'triggerconfigrelativedatetype', 'triggerconfigrelativedatevalue', 'automessage_trigger']
$table
protected
mixed
$table
= 'middag_items'
$table_metadata
protected
mixed
$table_metadata
= 'middag_itemmeta'
Methods
__clone()
public
__clone() : mixed
__construct()
Constructor.
public
__construct([mixed $id = null ]) : mixed
Parameters
- $id : mixed = null
all()
public
all() : array<string|int, mixed>
Return values
array<string|int, mixed>calculate_tolerance_trigger_relativedate()
public
calculate_tolerance_trigger_relativedate(mixed $value) : float|int
Parameters
- $value : mixed
Return values
float|intcalculate_trigger_interval()
public
calculate_trigger_interval() : mixed
check_context()
public
check_context(int $contextid) : bool
Parameters
- $contextid : int
Return values
boolcheck_trigger_event()
public
check_trigger_event() : bool|null
Return values
bool|nullclone()
public
clone() : static
Return values
staticdelete()
public
delete() : bool
Return values
booldeleted()
public
deleted() : bool
Tags
Return values
booldisabled()
public
disabled() : bool
Return values
booldisplay_presend()
public
display_presend() : mixed
display_sentype()
public
display_sentype() : string
Return values
stringdisplay_status()
public
display_status() : mixed
display_trigger()
public
display_trigger() : mixed
display_trigger_event()
public
display_trigger_event() : string
Return values
stringdisplay_trigger_interval_repeats()
public
display_trigger_interval_repeats() : string
Return values
stringdisplay_trigger_relativedate()
public
display_trigger_relativedate() : string
Return values
stringenabled()
public
enabled() : bool
Return values
boolfilter_trigger_relativedate()
public
filter_trigger_relativedate(mixed $userids) : array<string|int, mixed>
Parameters
- $userids : mixed
Return values
array<string|int, mixed>get_all_metadata()
public
get_all_metadata() : array<string, mixed>
Return values
array<string, mixed>get_attachments()
public
get_attachments() : array<int, mixed>
Return values
array<int, mixed>get_automessage_trigger()
public
get_automessage_trigger() : mixed
get_content()
public
get_content(mixed $userid[, mixed $courseid = null ]) : array<string|int, mixed>
Parameters
- $userid : mixed
- $courseid : mixed = null
Return values
array<string|int, mixed>get_contexts_name_trigger_event()
public
get_contexts_name_trigger_event() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>get_contexts_trigger_event()
public
get_contexts_trigger_event() : array<string|int, context>
Return values
array<string|int, context>get_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_options_sendtype()
public
static get_options_sendtype([mixed $option = false ]) : mixed
Parameters
- $option : mixed = false
get_options_status()
public
static get_options_status([mixed $status = false ]) : array<string|int, mixed>|string
Parameters
- $status : mixed = false
Return values
array<string|int, mixed>|stringget_options_trigger()
public
static get_options_trigger([mixed $trigger = false ]) : array<string|int, mixed>|string
Parameters
- $trigger : mixed = false
Return values
array<string|int, mixed>|stringget_options_trigger_event()
public
static get_options_trigger_event([mixed $option = false ]) : array<string|int, mixed>|string
Parameters
- $option : mixed = false
Return values
array<string|int, mixed>|stringget_options_trigger_interval_limit()
public
static get_options_trigger_interval_limit([mixed $option = false ]) : array<string|int, mixed>|string
Parameters
- $option : mixed = false
Return values
array<string|int, mixed>|stringget_options_trigger_interval_repeats()
public
static get_options_trigger_interval_repeats([mixed $option = false ]) : array<string|int, mixed>|string
Parameters
- $option : mixed = false
Return values
array<string|int, mixed>|stringget_options_trigger_relativedate()
public
static get_options_trigger_relativedate([mixed $option = false ]) : array<string|int, mixed>|string
Parameters
- $option : mixed = false
Return values
array<string|int, mixed>|stringget_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_table()
public
get_table() : string|null
Return values
string|nullget_table_metadata()
public
get_table_metadata() : string
Return values
stringget_values_trigger_interval_repeats()
public
static get_values_trigger_interval_repeats([mixed $option = false ]) : array<string|int, mixed>|int
Parameters
- $option : mixed = false
Return values
array<string|int, mixed>|intload()
public
load([mixed $reload = false ]) : void
Parameters
- $reload : mixed = false
preview()
public
preview() : array<string|int, mixed>
Return values
array<string|int, mixed>save_attachment()
public
save_attachment(mixed $attachment) : stdClass
Parameters
- $attachment : mixed
Return values
stdClasssendtest()
public
sendtest() : bool
Return values
boolset_automessage_trigger()
public
set_automessage_trigger(mixed $id) : void
Parameters
- $id : mixed
set_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>
set_trigger_interval()
public
set_trigger_interval() : void
update()
Update the model with form data.
public
update([mixed $formdata = [] ]) : static
Parameters
- $formdata : 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