Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | List of all members
profile_define_base Class Reference

Class profile_define_base. More...

Inheritance diagram for profile_define_base:
profile_define_checkbox profile_define_datetime profile_define_menu profile_define_text profile_define_textarea

Public Member Functions

 define_after_data (&$mform)
 Alter form based on submitted or existing data. More...
 
 define_editors ()
 Provides a method by which we can allow the default data in profile_define_* to use an editor. More...
 
 define_form (&$form)
 Prints out the form snippet for creating or editing a profile field. More...
 
 define_form_common (&$form)
 Prints out the form snippet for the part of creating or editing a profile field common to all data types. More...
 
 define_form_specific ($form)
 Prints out the form snippet for the part of creating or editing a profile field specific to the current data type. More...
 
 define_save ($data)
 Add a new profile field or save changes to current field. More...
 
 define_save_preprocess ($data)
 Preprocess data from the add/edit profile field form before it is saved. More...
 
 define_validate ($data, $files)
 Validate the data from the add/edit profile field form. More...
 
 define_validate_common ($data, $files)
 Validate the data from the add/edit profile field form that is common to all data types. More...
 
 define_validate_specific ($data, $files)
 Validate the data from the add/edit profile field form that is specific to the current data type. More...
 

Detailed Description

Class profile_define_base.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ define_after_data()

profile_define_base::define_after_data ( $mform)

Alter form based on submitted or existing data.

Parameters
moodleform$mform

Reimplemented in profile_define_datetime.

◆ define_editors()

profile_define_base::define_editors ( )

Provides a method by which we can allow the default data in profile_define_* to use an editor.

This should return an array of editor names (which will need to be formatted/cleaned)

Return values
array

Reimplemented in profile_define_textarea.

◆ define_form()

profile_define_base::define_form ( $form)

Prints out the form snippet for creating or editing a profile field.

Parameters
moodleform$forminstance of the moodleform class

◆ define_form_common()

profile_define_base::define_form_common ( $form)

Prints out the form snippet for the part of creating or editing a profile field common to all data types.

Parameters
moodleform$forminstance of the moodleform class

◆ define_form_specific()

profile_define_base::define_form_specific (   $form)

Prints out the form snippet for the part of creating or editing a profile field specific to the current data type.

Parameters
moodleform$forminstance of the moodleform class

Reimplemented in profile_define_textarea, profile_define_text, profile_define_menu, profile_define_datetime, and profile_define_checkbox.

◆ define_save()

profile_define_base::define_save (   $data)

Add a new profile field or save changes to current field.

Parameters
array | stdClass$datafrom the add/edit profile field form

◆ define_save_preprocess()

profile_define_base::define_save_preprocess (   $data)

Preprocess data from the add/edit profile field form before it is saved.

This method is a hook for the child classes to overwrite.

Parameters
array | stdClass$datafrom the add/edit profile field form
Return values
array|stdClassprocessed data object

Reimplemented in profile_define_menu, and profile_define_datetime.

◆ define_validate()

profile_define_base::define_validate (   $data,
  $files 
)

Validate the data from the add/edit profile field form.

Generally this method should not be overwritten by child classes.

Parameters
stdClass | array$datafrom the add/edit profile field form
array$files
Return values
arrayassociative array of error messages

◆ define_validate_common()

profile_define_base::define_validate_common (   $data,
  $files 
)

Validate the data from the add/edit profile field form that is common to all data types.

Generally this method should not be overwritten by child classes.

Parameters
stdClass | array$datafrom the add/edit profile field form
array$files
Return values
arrayassociative array of error messages

◆ define_validate_specific()

profile_define_base::define_validate_specific (   $data,
  $files 
)

Validate the data from the add/edit profile field form that is specific to the current data type.

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

Reimplemented in profile_define_menu, and profile_define_datetime.


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