Class data.
More...
◆ create()
static core_customfield\data_controller::create |
( |
int |
$id, |
|
|
stdClass |
$record = null , |
|
|
field_controller |
$field = null |
|
) |
| |
|
staticinherited |
Creates an instance of data_controller.
Parameters $id, $record and $field can complement each other but not conflict. If $id is not specified, fieldid must be present either in $record or in $field. If $id is not specified, instanceid must be present in $record
No DB queries are performed if both $record and $field are specified.
- Parameters
-
- Return values
-
- Exceptions
-
◆ datafield()
customfield_date\data_controller::datafield |
( |
| ) |
|
◆ delete()
core_customfield\data_controller::delete |
( |
| ) |
|
|
inherited |
◆ display()
core_customfield\data_controller::display |
( |
| ) |
|
|
inherited |
Used by handlers to display data on various places.
- Return values
-
◆ export_value()
customfield_date\data_controller::export_value |
( |
| ) |
|
◆ get()
core_customfield\data_controller::get |
( |
|
$property | ) |
|
|
finalinherited |
Persistent getter parser.
- Parameters
-
- Return values
-
◆ get_context()
core_customfield\data_controller::get_context |
( |
| ) |
|
|
inherited |
Return the context of the field.
- Return values
-
◆ get_default_value()
customfield_date\data_controller::get_default_value |
( |
| ) |
|
Returns the default value as it would be stored in the database (not in human-readable format).
- Return values
-
Reimplemented from core_customfield\data_controller.
◆ get_field()
core_customfield\data_controller::get_field |
( |
| ) |
|
|
inherited |
Field associated with this data.
- Return values
-
◆ get_form_element_name()
core_customfield\data_controller::get_form_element_name |
( |
| ) |
|
|
protectedinherited |
◆ get_value()
core_customfield\data_controller::get_value |
( |
| ) |
|
|
inherited |
Returns the value as it is stored in the database or default value if data record is not present.
- Return values
-
◆ instance_form_before_set_data()
core_customfield\data_controller::instance_form_before_set_data |
( |
\stdClass |
$instance | ) |
|
|
inherited |
Prepares the custom field data related to the object to pass to mform->set_data() and adds them to it.
This function must be called before calling $form->set_data($object);
- Parameters
-
stdClass | $instance | the instance that has custom fields, if 'id' attribute is present the custom fields for this instance will be added, otherwise the default values will be added. |
Reimplemented in customfield_textarea\data_controller.
◆ instance_form_definition()
customfield_date\data_controller::instance_form_definition |
( |
\MoodleQuickForm |
$mform | ) |
|
◆ instance_form_definition_after_data()
core_customfield\data_controller::instance_form_definition_after_data |
( |
\MoodleQuickForm |
$mform | ) |
|
|
inherited |
Called from instance edit form in definition_after_data()
- Parameters
-
◆ instance_form_save()
core_customfield\data_controller::instance_form_save |
( |
\stdClass |
$datanew | ) |
|
|
inherited |
◆ instance_form_validation()
customfield_date\data_controller::instance_form_validation |
( |
array |
$data, |
|
|
array |
$files |
|
) |
| |
◆ is_empty()
core_customfield\data_controller::is_empty |
( |
|
$value | ) |
|
|
protectedinherited |
Checks if the value is empty.
- Parameters
-
- Return values
-
◆ is_unique()
core_customfield\data_controller::is_unique |
( |
|
$value | ) |
|
|
protectedinherited |
Checks if the value is unique.
- Parameters
-
- Return values
-
◆ save()
core_customfield\data_controller::save |
( |
| ) |
|
|
inherited |
Persistent save parser.
- Return values
-
◆ set()
core_customfield\data_controller::set |
( |
|
$property, |
|
|
|
$value |
|
) |
| |
|
finalinherited |
Persistent setter parser.
- Parameters
-
string | $property | |
mixed | $value | |
- Return values
-
◆ to_record()
core_customfield\data_controller::to_record |
( |
| ) |
|
|
finalinherited |
Persistent to_record parser.
- Return values
-
The documentation for this class was generated from the following file: