Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
customfield_number\missing_provider Class Reference
Inheritance diagram for customfield_number\missing_provider:
customfield_number\provider_base

Public Member Functions

 config_form_definition (MoodleQuickForm $mform)
 Add provider specific fields for form.
 
 config_form_validation (array $data, array $files=[])
 Validate the data on the field configuration form.
 
 get_default_value ()
 Default value if there is no value in the database (or there is a null)
 
 get_name ()
 Provider name.
 
 is_available ()
 If provide is available for the current field.
 
 prepare_export_value (mixed $value, ?\context $context=null)
 How the field should be displayed.
 
 recalculate (?int $instanceid=null)
 Recalculate field value.
 

Static Public Member Functions

static get_all_providers (field_controller $field)
 List of applicable automatic providers for this field.
 
static instance (\core_customfield\field_controller $field)
 Returns a new provider instance.
 

Member Function Documentation

◆ config_form_definition()

customfield_number\provider_base::config_form_definition ( MoodleQuickForm $mform)
inherited

Add provider specific fields for form.

Parameters
MoodleQuickForm$mform

Reimplemented in customfield_number\local\numberproviders\nofactivities.

◆ config_form_validation()

customfield_number\provider_base::config_form_validation ( array $data,
array $files = [] )
inherited

Validate the data on the field configuration form.

Providers can override it

Parameters
array$data
array$files
Return values
arrayassociative array of error messages

Reimplemented in customfield_number\local\numberproviders\nofactivities.

◆ get_all_providers()

static customfield_number\provider_base::get_all_providers ( field_controller $field)
staticfinalinherited

List of applicable automatic providers for this field.

Parameters
field_controller$field
Return values
provider_base[]

◆ get_default_value()

customfield_number\provider_base::get_default_value ( )
inherited

Default value if there is no value in the database (or there is a null)

Usually returns either null or 0

Return values
null|float

◆ get_name()

customfield_number\missing_provider::get_name ( )

Provider name.

Reimplemented from customfield_number\provider_base.

◆ instance()

static customfield_number\provider_base::instance ( \core_customfield\field_controller $field)
staticfinalinherited

Returns a new provider instance.

Parameters
field_controller$fieldField

◆ is_available()

customfield_number\missing_provider::is_available ( )

If provide is available for the current field.

Reimplemented from customfield_number\provider_base.

◆ prepare_export_value()

customfield_number\provider_base::prepare_export_value ( mixed $value,
?\context $context = null )
inherited

How the field should be displayed.

Called from {

See also
field_controller::prepare_field_for_display()} The return value may contain safe HTML but all user input must be passed through format_string/format_text functions
Parameters
mixed$valueString or float
context | null$contextContext
Return values
?stringnull if the field should not be displayed or string representation of the field

Reimplemented in customfield_number\local\numberproviders\nofactivities.

◆ recalculate()

customfield_number\provider_base::recalculate ( ?int $instanceid = null)
inherited

Recalculate field value.

Parameters
int | null$instanceid

Reimplemented in customfield_number\local\numberproviders\nofactivities.


The documentation for this class was generated from the following file: