See Release Notes
Long Term Support Release
This file contains the core_privacy\manager class.
Copyright: | 2018 Jake Dallimore <jrhdallimore@gmail.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 635 lines (29 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
manager:: (20 methods):
set_observer()
component_is_compliant()
get_null_provider_reason()
is_empty_subsystem()
get_metadata_for_components()
get_contexts_for_userid()
get_users_in_context()
export_user_data()
delete_data_for_user()
delete_data_for_users_in_context()
delete_data_for_all_users_in_context()
get_component_list()
get_provider_classname()
get_provider_classname_for_component()
component_implements()
plugintype_class_callback()
component_class_callback()
get_log_tracer()
handled_component_class_callback()
component_class_callback_failed()
set_observer(manager_observer $observer) X-Ref |
Set the failure handler. param: manager_observer $observer |
component_is_compliant(string $component) X-Ref |
Checks whether the given component is compliant with the core_privacy API. To be considered compliant, a component must declare whether (and where) it stores personal data. Components which do store personal data must: - Have implemented the core_privacy\local\metadata\provider interface (to describe the data it stores) and; - Have implemented the core_privacy\local\request\data_provider interface (to facilitate export of personal data) - Have implemented the core_privacy\local\request\deleter interface Components which do not store personal data must: - Have implemented the core_privacy\local\metadata\null_provider interface to signal that they don't store personal data. param: string $component frankenstyle component name, e.g. 'mod_assign' return: bool true if the component is compliant, false otherwise. |
get_null_provider_reason(string $component) X-Ref |
Retrieve the reason for implementing the null provider interface. param: string $component Frankenstyle component name. return: string The key to retrieve the language string for the null provider reason. |
is_empty_subsystem($component) X-Ref |
Return whether this is an 'empty' subsystem - that is, a subsystem without a directory. param: string $component Frankenstyle component name. return: string The key to retrieve the language string for the null provider reason. |
get_metadata_for_components() X-Ref |
Get the privacy metadata for all components. return: collection[] The array of collection objects, indexed by frankenstyle component name. |
get_contexts_for_userid(int $userid) X-Ref |
Gets a collection of resultset objects for all components. param: int $userid the id of the user we're fetching contexts for. return: contextlist_collection the collection of contextlist items for the respective components. |
get_users_in_context(\context $context) X-Ref |
Gets a collection of users for all components in the specified context. param: \context $context The context to search return: userlist_collection the collection of userlist items for the respective components. |
export_user_data(contextlist_collection $contextlistcollection) X-Ref |
Export all user data for the specified approved_contextlist items. Note: userid and component are stored in each respective approved_contextlist. param: contextlist_collection $contextlistcollection the collection of contextlists for all components. return: string the location of the exported data. |
delete_data_for_user(contextlist_collection $contextlistcollection) X-Ref |
Delete all user data for approved contexts lists provided in the collection. This call relates to the forgetting of an entire user. Note: userid and component are stored in each respective approved_contextlist. param: contextlist_collection $contextlistcollection the collections of approved_contextlist items on which to call deletion. |
delete_data_for_users_in_context(\core_privacy\local\request\userlist_collection $collection) X-Ref |
Delete all user data for all specified users in a context. param: \core_privacy\local\request\userlist_collection $collection |
delete_data_for_all_users_in_context(\context $context) X-Ref |
Delete all use data which matches the specified deletion criteria. param: \context $context The specific context to delete data for. |
get_component_list() X-Ref |
Returns a list of frankenstyle names of core components (plugins and subsystems). return: array the array of frankenstyle component names. |
get_provider_classname($component) X-Ref |
Return the fully qualified provider classname for the component. param: string $component the frankenstyle component name. return: string the fully qualified provider classname. |
get_provider_classname_for_component(string $component) X-Ref |
Return the fully qualified provider classname for the component. param: string $component the frankenstyle component name. return: string the fully qualified provider classname. |
component_implements(string $component, string $interface) X-Ref |
Checks whether the component's provider class implements the specified interface. This can either be implemented directly, or by implementing a descendant (extension) of the specified interface. param: string $component the frankenstyle component name. param: string $interface the name of the interface we want to check. return: bool True if an implementation was found, false otherwise. |
plugintype_class_callback(string $plugintype, string $interface, string $methodname, array $params) X-Ref |
Call the named method with the specified params on any plugintype implementing the relevant interface. param: string $plugintype The plugingtype to check param: string $interface The interface to implement param: string $methodname The method to call param: array $params The params to call |
component_class_callback(string $component, string $interface, string $methodname, array $params) X-Ref |
Call the named method with the specified params on the supplied component if it implements the relevant interface on its provider. param: string $component The component to call param: string $interface The interface to implement param: string $methodname The method to call param: array $params The params to call return: mixed |
get_log_tracer() X-Ref |
Get the tracer used for logging. The text tracer is used except for unit tests. return: \progress_trace |
handled_component_class_callback(string $component, string $interface, string $methodname, array $params) X-Ref |
Call the named method with the specified params on the supplied component if it implements the relevant interface on its provider. param: string $component The component to call param: string $interface The interface to implement param: string $methodname The method to call param: array $params The params to call return: mixed |
component_class_callback_failed(\Throwable $e, string $component, string $interface,string $methodname, array $params) X-Ref |
Notifies the observer of any failure. param: \Throwable $e param: string $component param: string $interface param: string $methodname param: array $params |