Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Static Public Member Functions | Static Protected Member Functions | List of all members
core_calendar\privacy\provider Class Reference

Privacy Subsystem for core_calendar implementing metadata, plugin, and user_preference providers. More...

Inheritance diagram for core_calendar\privacy\provider:
core_privacy\local\metadata\provider core_privacy\local\request\plugin\provider core_privacy\local\request\core_userlist_provider core_privacy\local\request\user_preference_provider core_privacy\local\request\core_user_data_provider core_privacy\local\request\userlist_provider core_privacy\local\request\core_data_provider core_privacy\local\request\core_data_provider core_privacy\local\request\data_provider core_privacy\local\request\data_provider

Static Public Member Functions

static delete_data_for_all_users_in_context (\context $context)
 Delete all Calendar Event and Calendar Subscription data for all users in the specified context. More...
 
static delete_data_for_user (approved_contextlist $contextlist)
 Delete all user data for the specified user, in the specified contexts. More...
 
static delete_data_for_users (approved_userlist $userlist)
 Delete multiple users within a single context. More...
 
static export_user_data (approved_contextlist $contextlist)
 Export all user data for the specified user, in the specified contexts. More...
 
static export_user_preferences (int $userid)
 Export all user preferences for the plugin. More...
 
static get_contexts_for_userid (int $userid)
 Get the list of contexts that contain calendar user information for the specified user. More...
 
static get_metadata (collection $collection)
 Provides meta data that is stored about a user with core_calendar. More...
 
static get_users_in_context (userlist $userlist)
 Get the list of users within a specific context. More...
 

Static Protected Member Functions

static delete_batch_records ($tablename, $field, $values)
 Helper function to delete records in batches in order to minimise amount of deletion queries. More...
 
static export_user_calendar_event_data (approved_contextlist $contextlist)
 Helper function to export Calendar Events data by a User's contextlist. More...
 
static export_user_calendar_subscription_data (approved_contextlist $contextlist)
 Helper function to export Calendar Subscriptions data by a User's contextlist. More...
 
static get_calendar_event_details_by_contextlist (approved_contextlist $contextlist)
 Helper function to return the Calendar Events for a given user and context list. More...
 
static get_calendar_event_ids_by_context (\context $context, $userids=array())
 Helper function to return all Calendar Event id results for a specified context and optionally included user list. More...
 
static get_calendar_subscription_details_by_contextlist (approved_contextlist $contextlist)
 Helper function to return the Calendar Subscriptions for a given user and context list. More...
 
static get_calendar_subscription_ids_by_context (\context $context, $userids=array())
 Helper function to return all Calendar Subscription id results for a specified context and optionally included user list. More...
 

Detailed Description

Privacy Subsystem for core_calendar implementing metadata, plugin, and user_preference providers.

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

Member Function Documentation

◆ delete_batch_records()

static core_calendar\privacy\provider::delete_batch_records (   $tablename,
  $field,
  $values 
)
staticprotected

Helper function to delete records in batches in order to minimise amount of deletion queries.

Parameters
string$tablenameThe table name to delete from.
string$fieldThe table column field name to delete records by.
array$valuesThe table column field values to delete records by.
Exceptions
dml_exception

◆ delete_data_for_all_users_in_context()

static core_calendar\privacy\provider::delete_data_for_all_users_in_context ( \context  $context)
static

Delete all Calendar Event and Calendar Subscription data for all users in the specified context.

Parameters
context$contextTransform the specific context to delete data for.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_user()

static core_calendar\privacy\provider::delete_data_for_user ( approved_contextlist  $contextlist)
static

Delete all user data for the specified user, in the specified contexts.

Parameters
approved_contextlist$contextlistThe approved contexts and user information to delete information for.

Implements core_privacy\local\request\core_user_data_provider.

◆ delete_data_for_users()

static core_calendar\privacy\provider::delete_data_for_users ( approved_userlist  $userlist)
static

Delete multiple users within a single context.

Parameters
approved_userlist$userlistThe approved context and user information to delete information for.

Implements core_privacy\local\request\core_userlist_provider.

◆ export_user_calendar_event_data()

static core_calendar\privacy\provider::export_user_calendar_event_data ( approved_contextlist  $contextlist)
staticprotected

Helper function to export Calendar Events data by a User's contextlist.

Parameters
approved_contextlist$contextlist
Exceptions
coding_exception

◆ export_user_calendar_subscription_data()

static core_calendar\privacy\provider::export_user_calendar_subscription_data ( approved_contextlist  $contextlist)
staticprotected

Helper function to export Calendar Subscriptions data by a User's contextlist.

Parameters
approved_contextlist$contextlist
Exceptions
coding_exception

◆ export_user_data()

static core_calendar\privacy\provider::export_user_data ( approved_contextlist  $contextlist)
static

Export all user data for the specified user, in the specified contexts.

Parameters
approved_contextlist$contextlistThe approved contexts to export information for.

Implements core_privacy\local\request\core_user_data_provider.

◆ export_user_preferences()

static core_calendar\privacy\provider::export_user_preferences ( int  $userid)
static

Export all user preferences for the plugin.

Parameters
int$useridThe userid of the user whose data is to be exported.

Implements core_privacy\local\request\user_preference_provider.

◆ get_calendar_event_details_by_contextlist()

static core_calendar\privacy\provider::get_calendar_event_details_by_contextlist ( approved_contextlist  $contextlist)
staticprotected

Helper function to return the Calendar Events for a given user and context list.

Parameters
approved_contextlist$contextlist
Return values
array
Exceptions
coding_exception
dml_exception

◆ get_calendar_event_ids_by_context()

static core_calendar\privacy\provider::get_calendar_event_ids_by_context ( \context  $context,
  $userids = array() 
)
staticprotected

Helper function to return all Calendar Event id results for a specified context and optionally included user list.

Parameters
context$context
array$userids
Return values
array|null
Exceptions
dml_exception

◆ get_calendar_subscription_details_by_contextlist()

static core_calendar\privacy\provider::get_calendar_subscription_details_by_contextlist ( approved_contextlist  $contextlist)
staticprotected

Helper function to return the Calendar Subscriptions for a given user and context list.

Parameters
approved_contextlist$contextlist
Return values
array
Exceptions
coding_exception
dml_exception

◆ get_calendar_subscription_ids_by_context()

static core_calendar\privacy\provider::get_calendar_subscription_ids_by_context ( \context  $context,
  $userids = array() 
)
staticprotected

Helper function to return all Calendar Subscription id results for a specified context and optionally included user list.

Parameters
context$context
array$userids
Return values
array
Exceptions
dml_exception

◆ get_contexts_for_userid()

static core_calendar\privacy\provider::get_contexts_for_userid ( int  $userid)
static

Get the list of contexts that contain calendar user information for the specified user.

Parameters
int$useridThe user to search.
Return values
contextlist::$contextlistThe contextlist containing the list of contexts used in this plugin.

Implements core_privacy\local\request\core_user_data_provider.

◆ get_metadata()

static core_calendar\privacy\provider::get_metadata ( collection  $collection)
static

Provides meta data that is stored about a user with core_calendar.

Parameters
collection$collectionA collection of meta data items to be added to.
Return values
collectionReturns the collection of metadata.

Implements core_privacy\local\metadata\provider.

◆ get_users_in_context()

static core_calendar\privacy\provider::get_users_in_context ( userlist  $userlist)
static

Get the list of users within a specific context.

Parameters
userlist$userlistThe userlist containing the list of users who have data in this context/plugin combination.

Implements core_privacy\local\request\core_userlist_provider.


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