Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_customfield\privacy\customfield_provider Interface Reference

Interface customfield_provider, all customfield plugins need to implement it. More...

Inheritance diagram for core_customfield\privacy\customfield_provider:
core_privacy\local\request\plugin\subplugin_provider core_privacy\local\request\shared_userlist_provider core_privacy\local\request\shared_data_provider core_privacy\local\request\userlist_provider core_privacy\local\request\data_provider customfield_checkbox\privacy\provider customfield_date\privacy\provider customfield_select\privacy\provider customfield_text\privacy\provider customfield_textarea\privacy\provider

Static Public Member Functions

static before_delete_data (string $dataidstest, array $params, array $contextids)
 Allows plugins to delete everything they store related to the data (usually files)
 
static before_delete_fields (string $fieldidstest, array $params, array $contextids)
 Allows plugins to delete everything they store related to the field configuration (usually files)
 
static export_customfield_data (data_controller $data, stdClass $exportdata, array $subcontext)
 Preprocesses data object that is going to be exported.
 

Detailed Description

Interface customfield_provider, all customfield plugins need to implement it.

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

Member Function Documentation

◆ before_delete_data()

static core_customfield\privacy\customfield_provider::before_delete_data ( string $dataidstest,
array $params,
array $contextids )
static

Allows plugins to delete everything they store related to the data (usually files)

If plugin does not store any related files or other information, implement as an empty function

Parameters
string$dataidstestselect query for data id (note that it may also return data for other field types)
array$paramsnamed parameters for the select query
array$contextidslist of affected data contexts
Return values
mixed

Implemented in customfield_checkbox\privacy\provider, customfield_date\privacy\provider, customfield_select\privacy\provider, customfield_text\privacy\provider, and customfield_textarea\privacy\provider.

◆ before_delete_fields()

static core_customfield\privacy\customfield_provider::before_delete_fields ( string $fieldidstest,
array $params,
array $contextids )
static

Allows plugins to delete everything they store related to the field configuration (usually files)

The implementation should not delete data or anything related to the data, since "before_delete_data" is invoked separately.

If plugin does not store any related files or other information, implement as an empty function

Parameters
string$fieldidstestselect query for field id (note that it may also return fields of other types)
array$paramsnamed parameters for the select query
int[]$contextidslist of affected configuration contexts

Implemented in customfield_checkbox\privacy\provider, customfield_date\privacy\provider, customfield_select\privacy\provider, customfield_text\privacy\provider, and customfield_textarea\privacy\provider.

◆ export_customfield_data()

static core_customfield\privacy\customfield_provider::export_customfield_data ( data_controller $data,
stdClass $exportdata,
array $subcontext )
static

Preprocesses data object that is going to be exported.

Minimum implementation: writer\with_context($data->get_context())->export_data($subcontext, $exportdata);

Parameters
data_controller$data
stdClass$exportdatagenerated object to be exported
array$subcontextsubcontext to use when exporting
Return values
mixed

Implemented in customfield_checkbox\privacy\provider, customfield_date\privacy\provider, customfield_select\privacy\provider, customfield_text\privacy\provider, and customfield_textarea\privacy\provider.


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