field_factory
Table of Contents
Constants
-
FIELD_CLASSES
= ['text' => \local_middag\extensions\customform\model\field\text_field::class, 'number' => \local_middag\extensions\customform\model\field\number_field::class, 'email' => \local_middag\extensions\customform\model\field\email_field::class, 'select' => \local_middag\extensions\customform\model\field\select_field::class, 'multipleselect' => \local_middag\extensions\customform\model\field\multipleselect_field::class, 'checkbox' => \local_middag\extensions\customform\model\field\checkbox_field::class, 'header' => \local_middag\extensions\customform\model\field\header_field::class, 'cpf' => \local_middag\extensions\customform\model\field\cpf_field::class]
Methods
-
create()
: base_field
-
get_field_by_form()
: array<string|int, mixed>
-
get_field_by_step()
: array<string|int, mixed>
-
get_field_formid_and_idnumber()
: array<string|int, mixed>|false|object
-
get_field_shortname_and_idnumber()
: array<string|int, mixed>|false|object
-
get_form_field_class()
: string
-
get_form_field_class_by_type()
: false|string
-
update()
: base_field
FIELD_CLASSES
public
mixed
FIELD_CLASSES
= ['text' => \local_middag\extensions\customform\model\field\text_field::class, 'number' => \local_middag\extensions\customform\model\field\number_field::class, 'email' => \local_middag\extensions\customform\model\field\email_field::class, 'select' => \local_middag\extensions\customform\model\field\select_field::class, 'multipleselect' => \local_middag\extensions\customform\model\field\multipleselect_field::class, 'checkbox' => \local_middag\extensions\customform\model\field\checkbox_field::class, 'header' => \local_middag\extensions\customform\model\field\header_field::class, 'cpf' => \local_middag\extensions\customform\model\field\cpf_field::class]
create()
public
static create(object $data) : base_field
Parameters
-
$data
: object
-
-
throws
-
Exception
public
static get_field_by_form([mixed $form_id = 0 ]) : array<string|int, mixed>
Parameters
-
$form_id
: mixed
= 0
-
Return values
array<string|int, mixed>
get_field_by_step()
public
static get_field_by_step([mixed $stepId = 0 ]) : array<string|int, mixed>
Parameters
-
$stepId
: mixed
= 0
-
Return values
array<string|int, mixed>
public
static get_field_formid_and_idnumber([mixed $formid = 0 ][, mixed $idnumber = 0 ]) : array<string|int, mixed>|false|object
Parameters
-
$formid
: mixed
= 0
-
-
$idnumber
: mixed
= 0
-
Return values
array<string|int, mixed>|false|object
get_field_shortname_and_idnumber()
public
static get_field_shortname_and_idnumber([mixed $shortname = 0 ][, mixed $idnumber = 0 ]) : array<string|int, mixed>|false|object
Parameters
-
$shortname
: mixed
= 0
-
-
$idnumber
: mixed
= 0
-
Return values
array<string|int, mixed>|false|object
public
static get_form_field_class(mixed $field_type) : string
Parameters
-
$field_type
: mixed
-
public
static get_form_field_class_by_type(mixed $type) : false|string
Parameters
-
$type
: mixed
-
Return values
false|string
update()
public
static update(object $data) : base_field
Parameters
-
$data
: object
-