The core_privacy\local\request\helper class with useful shared functionality.
More...
◆ add_shared_contexts_to_contextlist_for()
static core_privacy\local\request\helper::add_shared_contexts_to_contextlist_for |
( |
int | $userid, |
|
|
contextlist | $contextlist ) |
|
static |
Add core-controlled contexts which are related to a component but that component may know about.
For example, most activities are not aware of activity completion, but the course implements it for them. These should be included.
- Parameters
-
int | $userid | The user being added for. |
contextlist | $contextlist | The contextlist being appended to. |
- Return values
-
contextlist | The final contextlist |
◆ add_shared_contexts_to_contextlist_for_course_module()
static core_privacy\local\request\helper::add_shared_contexts_to_contextlist_for_course_module |
( |
int | $userid, |
|
|
contextlist | $contextlist ) |
|
staticprotected |
Add core-controlled contexts which are related to a component but that component may know about.
For example, most activities are not aware of activity completion, but the course implements it for them. These should be included.
- Parameters
-
int | $userid | The user being added for. |
contextlist | $contextlist | The contextlist being appended to. |
- Return values
-
contextlist | The final contextlist |
◆ add_shared_users_to_userlist()
Add core-controlled contexts which are related to a component but that component may know about.
For example, most activities are not aware of activity completion, but the course implements it for them. These should be included.
- Parameters
-
- Return values
-
contextlist | The final contextlist |
◆ delete_data_for_all_users_in_context()
static core_privacy\local\request\helper::delete_data_for_all_users_in_context |
( |
string | $component, |
|
|
context | $context ) |
|
static |
Handle removal of 'standard' data for any plugin.
This will handle deletion for things such as activity completion.
- Parameters
-
string | $component | The component being deleted for. |
context | $context | The specific context to delete data for. |
◆ delete_data_for_all_users_in_context_course_module()
static core_privacy\local\request\helper::delete_data_for_all_users_in_context_course_module |
( |
string | $component, |
|
|
context | $context ) |
|
static |
Handle removal of 'standard' data for course modules.
This will handle deletion for things such as activity completion.
- Parameters
-
string | $component | The component being deleted for. |
context | $context | The context to delete all data for. |
◆ delete_data_for_user()
Delete all 'standard' user data for the specified user, in the specified contexts.
This will handle deletion for things such as activity completion.
- Parameters
-
approved_contextlist | $contextlist | The approved contexts and user information to delete information for. |
◆ delete_data_for_user_in_course_module()
static core_privacy\local\request\helper::delete_data_for_user_in_course_module |
( |
approved_contextlist | $contextlist | ) |
|
|
staticprotected |
Delete all 'standard' user data for the specified user in course modules.
This will handle deletion for things such as activity completion.
- Parameters
-
approved_contextlist | $contextlist | The approved contexts and user information to delete information for. |
◆ export_context_files()
static core_privacy\local\request\helper::export_context_files |
( |
\context | $context, |
|
|
stdClass | $user ) |
|
static |
Export all files for this context.
- Parameters
-
context | $context | The context to export files for. |
stdClass | $user | The user being written. |
- Return values
-
◆ export_context_module_files()
static core_privacy\local\request\helper::export_context_module_files |
( |
\context_module | $context, |
|
|
stdClass | $user ) |
|
staticprotected |
Get all general data for the activity module at this context.
- Parameters
-
context_module | $context | The context to retrieve data for. |
stdClass | $user | The user being written. |
- Return values
-
◆ export_data_for_null_provider()
static core_privacy\local\request\helper::export_data_for_null_provider |
( |
approved_contextlist | $contextlist | ) |
|
|
static |
Handle export of standard data for a plugin which implements the null provider and does not normally store data of its own.
This is used in cases such as activities like mod_resource, which do not store their own data, but may still have data on them (like Activity Completion).
Any context provided in a contextlist should have base data exported as a minimum.
- Parameters
-
approved_contextlist | $contextlist | The approved contexts to export information for. |
◆ get_context_block_data()
static core_privacy\local\request\helper::get_context_block_data |
( |
\context_block | $context, |
|
|
stdClass | $user ) |
|
staticprotected |
Get all general data for the block at this context.
- Parameters
-
context_block | $context | The context to retrieve data for. |
stdClass | $user | The user being written. |
- Return values
-
stdClass | General data about this block instance. |
◆ get_context_data()
static core_privacy\local\request\helper::get_context_data |
( |
\context | $context, |
|
|
stdClass | $user ) |
|
static |
Get all general data for this context.
- Parameters
-
context | $context | The context to retrieve data for. |
stdClass | $user | The user being written. |
- Return values
-
◆ get_context_module_data()
static core_privacy\local\request\helper::get_context_module_data |
( |
\context_module | $context, |
|
|
stdClass | $user ) |
|
staticprotected |
Get all general data for the activity module at this context.
- Parameters
-
context_module | $context | The context to retrieve data for. |
stdClass | $user | The user being written. |
- Return values
-
The documentation for this class was generated from the following file:
- privacy/classes/local/request/helper.php