From d49f9f280d4a9d80d83cc09e663d557b8d163aae Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Thu, 1 Mar 2018 12:15:56 +0800 Subject: [PATCH] MDL-61307 core_privacy: Implementation of itself --- lang/en/privacy.php | 2 ++ privacy/classes/privacy/provider.php | 47 ++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 privacy/classes/privacy/provider.php diff --git a/lang/en/privacy.php b/lang/en/privacy.php index 8ce89a7d366a..3e6613dfdf3a 100644 --- a/lang/en/privacy.php +++ b/lang/en/privacy.php @@ -21,3 +21,5 @@ * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + +$string['privacy:metadata'] = 'The privacy subsystem does not store any data of it\'s own and is designed to act as a conduit between components and the interface used to describe, export, and remove their data.'; diff --git a/privacy/classes/privacy/provider.php b/privacy/classes/privacy/provider.php new file mode 100644 index 000000000000..7af8f2d8dbcd --- /dev/null +++ b/privacy/classes/privacy/provider.php @@ -0,0 +1,47 @@ +. + +/** + * Privacy Subsystem implementation for the Privacy Subsystem (how very meta). + * + * @package core_privacy + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace core_privacy\privacy; + +defined('MOODLE_INTERNAL') || die(); + +/** + * The privacy subsystem does not store any data of it's own. + * It merely serves as a conduit to allow other components to describe, export, and delete data. + * + * @copyright 2018 Andrew Nicols + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class provider implements \core_privacy\local\metadata\null_provider { + + /** + * Get the language string identifier with the component's language + * file to explain why this plugin stores no data. + * + * @return string + */ + public static function get_reason() : string { + return 'privacy:metadata'; + } +}