MIDDAG for Moodle

form extends deprecated_item

Legacy item deprecated_model class.

Table of Contents

Constants

FORM_TYPE_DEFAULT  = 'default'
FORM_TYPE_EXTERNAL  = 'external'
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  = 'customform_form'

Properties

$action_edges  : array<string|int, mixed>|string
$actions  : array<string|int, base_action>
$contextid  : mixed
$courseid  : mixed
$csv_columns  : object|string
$csv_data  : array<string|int, mixed>|object|string
$description  : mixed
$descriptionformat  : mixed
$fields  : array<string|int, base_field>
$form_logo_image  : mixed
$form_type  : string|null
$fullname  : mixed
$guid  : mixed
$id  : mixed
$idnumber  : mixed
$is_multistep  : bool
$parent  : mixed
$raw_form_data  : object|string
$shortname  : mixed
$sortorder  : mixed
$status  : mixed
$steps  : array<string|int, step>
$timecreated  : mixed
$timemodified  : mixed
$type  : mixed
$url_edit  : string
$userid  : mixed
$usermodified  : mixed
$version  : mixed
$visible  : mixed
$fillable  : mixed
$table  : mixed
$table_metadata  : mixed

Methods

__clone()  : mixed
__construct()  : mixed
Constructor.
active_or_inactive_form()  : bool
all()  : array<string|int, mixed>
create()  : self
Create new customform.
customform_actions_create_or_update()  : bool
customform_display()  : array<string|int, mixed>
get data form customform display.
customform_update()  : false|self
delete()  : bool
deleted()  : bool
disabled()  : bool
enabled()  : bool
exists()  : bool
get_all_metadata()  : array<string, mixed>
get_file()  : mixed
Get file associated with the model.
get_fileurl()  : mixed
Get file URL.
get_form_logo()  : mixed
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_path()  : string|null
get_records()  : array<string|int, deprecated_model_interface>
get_table()  : string|null
get_table_metadata()  : string
is_default_form()  : bool
is_external_form()  : bool
list()  : array<string|int, mixed>
load()  : void
load_actions()  : void
load all form actions.
order_form_fields()  : array<string|int, mixed>
set_meta()  : void
Set metadata key-value pair.
set_metas()  : void
Set multiple metadata key-value pairs.
to_render_form()  : array<string|int, mixed>
get data form render.
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
load_fields()  : void
load all form fields.
load_steps()  : void
load all form steps.
pre_action_update()  : void
pre_field_update()  : void
pre_step_update()  : void

Constants

FORM_TYPE_DEFAULT

public mixed FORM_TYPE_DEFAULT = 'default'

FORM_TYPE_EXTERNAL

public mixed FORM_TYPE_EXTERNAL = 'external'

TYPE

public mixed TYPE = 'customform_form'

Properties

$action_edges

public array<string|int, mixed>|string $action_edges

$csv_columns

public object|string $csv_columns

$csv_data

public array<string|int, mixed>|object|string $csv_data

$form_logo_image

public mixed $form_logo_image

$form_type

public string|null $form_type = null

$fullname

public mixed $fullname

$idnumber

public mixed $idnumber

$is_multistep

public bool $is_multistep

$raw_form_data

public object|string $raw_form_data

$status

public mixed $status

$steps

public array<string|int, step> $steps = []

$url_edit

public string $url_edit

$fillable

protected mixed $fillable = ['is_multistep', 'csv_data', 'csv_columns', 'action_edges', 'form_type', 'raw_form_data', 'form_logo_image']

Methods

__construct()

Constructor.

public __construct([mixed $id = null ][, mixed $load_all = false ]) : mixed
Parameters
$id : mixed = null
$load_all : mixed = false

active_or_inactive_form()

public active_or_inactive_form() : bool
Return values
bool

all()

public all() : array<string|int, mixed>
Return values
array<string|int, mixed>

create()

Create new customform.

public create(object $data) : self
Parameters
$data : object
Return values
self

customform_actions_create_or_update()

public static customform_actions_create_or_update(mixed $data) : bool
Parameters
$data : mixed
Return values
bool

customform_display()

get data form customform display.

public static customform_display(mixed $idnumber) : array<string|int, mixed>
Parameters
$idnumber : mixed
Return values
array<string|int, mixed>

customform_update()

public customform_update(object $data) : false|self
Parameters
$data : object
Return values
false|self

deleted()

public deleted() : bool
Tags
throws
dml_exception
Return values
bool

exists()

public static exists(mixed $id) : bool
Parameters
$id : mixed
Return values
bool

get_all_metadata()

public get_all_metadata() : array<string, mixed>
Return values
array<string, mixed>

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
throws
coding_exception

get_fileurl()

Get file URL.

public static get_fileurl(mixed $file) : mixed
Parameters
$file : mixed
public get_form_logo() : 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
throws
dml_exception
Return values
deprecated_item

get_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
throws
coding_exception
throws
dml_exception
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
throws
coding_exception
throws
dml_exception
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
throws
dml_exception

get_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
throws
coding_exception
throws
dml_exception
Return values
array<string|int, deprecated_model_interface>

get_table_metadata()

public get_table_metadata() : string
Return values
string

is_default_form()

public is_default_form() : bool
Return values
bool

is_external_form()

public is_external_form() : bool
Return values
bool

list()

public static list([mixed $page = 0 ][, mixed $limit = 100 ][, mixed $search = null ]) : array<string|int, mixed>
Parameters
$page : mixed = 0
$limit : mixed = 100
$search : mixed = null
Return values
array<string|int, mixed>

load()

public load([mixed $reload = false ]) : void
Parameters
$reload : mixed = false

load_actions()

load all form actions.

public load_actions() : void

order_form_fields()

public order_form_fields(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>
Return values
array<string|int, 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
throws
dml_exception

set_metas()

Set multiple metadata key-value pairs.

public set_metas(array<string, mixed> $metas) : void
Parameters
$metas : array<string, mixed>

to_render_form()

get data form render.

public to_render_form() : array<string|int, mixed>
Return values
array<string|int, mixed>

update()

Update the model with form data.

public update([array<string, mixed> $formdata = [] ]) : static
Parameters
$formdata : array<string, mixed> = []
Return values
static

url_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_url

webhook_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_url

from_record()

protected static from_record(stdClass $r) : static
Parameters
$r : stdClass
Return values
static

get()

Get record by ID.

protected get(mixed $id) : false|mixed|stdClass
Parameters
$id : mixed
Tags
throws
dml_exception
Return values
false|mixed|stdClass

get_by_idnumber()

Get record by idnumber.

protected get_by_idnumber(mixed $idnumber) : false|mixed|stdClass
Parameters
$idnumber : mixed
Tags
throws
dml_exception
Return values
false|mixed|stdClass

load_fields()

load all form fields.

private load_fields() : void

load_steps()

load all form steps.

private load_steps() : void

pre_action_update()

private pre_action_update(mixed $new_actions) : void
Parameters
$new_actions : mixed

pre_field_update()

private pre_field_update(mixed $new_fields) : void
Parameters
$new_fields : mixed

pre_step_update()

private pre_step_update(mixed $new_steps) : void
Parameters
$new_steps : mixed

        
On this page

Search results