Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
profile_field_datetime Class Reference

This file contains the datetime profile field class. More...

Inheritance diagram for profile_field_datetime:

Public Member Functions

 display_data ()
 Display the data for this field.
 
 edit_field_add ($mform)
 Handles editing datetime fields.
 
 edit_save_data_preprocess ($datetime, $datarecord)
 If timestamp is in YYYY-MM-DD or YYYY-MM-DD-HH-MM-SS format, then convert it to timestamp.
 
 get_field_properties ()
 Return the field type and null properties.
 
 is_empty ()
 Check if the field data is considered empty.
 
 is_transform_supported ()
 Check if the field should convert the raw data into user-friendly data when exporting.
 

Detailed Description

This file contains the datetime profile field class.

License
http://www.gnu.org/copyleft/gpl.html GNU Public License Handles displaying and editing the datetime field.
License
http://www.gnu.org/copyleft/gpl.html GNU Public License

Member Function Documentation

◆ edit_field_add()

profile_field_datetime::edit_field_add ( $mform)

Handles editing datetime fields.

Parameters
moodleform$mform

◆ edit_save_data_preprocess()

profile_field_datetime::edit_save_data_preprocess ( $datetime,
$datarecord )

If timestamp is in YYYY-MM-DD or YYYY-MM-DD-HH-MM-SS format, then convert it to timestamp.

Parameters
string | int$datetimedatetime to be converted.
stdClass$datarecordThe object that will be used to save the record
Return values
inttimestamp
Since
Moodle 2.5

◆ get_field_properties()

profile_field_datetime::get_field_properties ( )

Return the field type and null properties.

This will be used for validating the data submitted by a user.

Return values
arraythe param type and null property
Since
Moodle 3.2

◆ is_empty()

profile_field_datetime::is_empty ( )

Check if the field data is considered empty.

Return values
boolean

◆ is_transform_supported()

profile_field_datetime::is_transform_supported ( )

Check if the field should convert the raw data into user-friendly data when exporting.

Return values
bool

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