|
24 | 24 |
|
25 | 25 | namespace block_tag_flickr\privacy;
|
26 | 26 |
|
| 27 | +use core_privacy\local\metadata\collection; |
| 28 | +use core_privacy\local\request\approved_contextlist; |
| 29 | +use core_privacy\local\request\context; |
| 30 | +use core_privacy\local\request\contextlist; |
| 31 | + |
27 | 32 | defined('MOODLE_INTERNAL') || die();
|
28 | 33 |
|
29 | 34 | /**
|
30 |
| - * Privacy Subsystem for block_tag_flickr implementing null_provider. |
| 35 | + * Privacy Subsystem for block_tag_flickr implementing metadata and plugin provider. |
31 | 36 | *
|
32 | 37 | * @copyright 2018 Zig Tan <zig@moodle.com>
|
33 | 38 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
34 | 39 | */
|
35 |
| -class provider implements \core_privacy\local\metadata\null_provider { |
| 40 | +class provider implements \core_privacy\local\metadata\provider, \core_privacy\local\request\plugin\provider { |
| 41 | + |
| 42 | + /** |
| 43 | + * Returns meta data about this system. |
| 44 | + * |
| 45 | + * @param collection $collection The initialised collection to add items to. |
| 46 | + * @return collection A listing of user data stored through this system. |
| 47 | + */ |
| 48 | + public static function get_metadata(collection $collection) : collection { |
| 49 | + $collection->add_external_location_link( |
| 50 | + 'flickr.com', |
| 51 | + [ |
| 52 | + 'tags' => 'privacy:metadata:block_tag_flickr:tags' |
| 53 | + ], |
| 54 | + 'privacy:metadata:block_tag_flickr' |
| 55 | + ); |
| 56 | + |
| 57 | + return $collection; |
| 58 | + } |
| 59 | + |
| 60 | + /** |
| 61 | + * Get the list of contexts that contain user information for the specified user. |
| 62 | + * |
| 63 | + * @param int $userid The user to search. |
| 64 | + * @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin. |
| 65 | + */ |
| 66 | + public static function get_contexts_for_userid(int $userid) : contextlist { |
| 67 | + return new contextlist(); |
| 68 | + } |
36 | 69 |
|
37 | 70 | /**
|
38 |
| - * Get the language string identifier with the component's language |
39 |
| - * file to explain why this plugin stores no data. |
| 71 | + * Export all user data for the specified user, in the specified contexts. |
40 | 72 | *
|
41 |
| - * @return string |
| 73 | + * @param approved_contextlist $contextlist The approved contexts to export information for. |
42 | 74 | */
|
43 |
| - public static function get_reason() : string { |
44 |
| - return 'privacy:metadata'; |
| 75 | + public static function export_user_data(approved_contextlist $contextlist) { |
45 | 76 | }
|
| 77 | + |
| 78 | + /** |
| 79 | + * Delete all data for all users in the specified context. |
| 80 | + * |
| 81 | + * @param context $context The specific context to delete data for. |
| 82 | + */ |
| 83 | + public static function delete_data_for_all_users_in_context(\context $context) { |
| 84 | + } |
| 85 | + |
| 86 | + /** |
| 87 | + * Delete all user data for the specified user, in the specified contexts. |
| 88 | + * |
| 89 | + * @param approved_contextlist $contextlist The approved contexts and user information to delete information for. |
| 90 | + */ |
| 91 | + public static function delete_data_for_user(approved_contextlist $contextlist) { |
| 92 | + } |
| 93 | + |
46 | 94 | }
|
0 commit comments