From fdb2a8fffbd5bef141b28ae695904258d160e489 Mon Sep 17 00:00:00 2001 From: IanM <16573496+imorland@users.noreply.github.com> Date: Wed, 25 Oct 2023 22:04:38 +0100 Subject: [PATCH] chore: support gdpr beta 17 (#92) * chore: support gdpr beta 17 * Apply fixes from StyleCI --------- Co-authored-by: StyleCI Bot --- src/Data/Drafts.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Data/Drafts.php b/src/Data/Drafts.php index 8944653..f4e7a3e 100644 --- a/src/Data/Drafts.php +++ b/src/Data/Drafts.php @@ -18,6 +18,11 @@ class Drafts extends Type { + public static function exportDescription(): string + { + return 'All drafts created by the user.'; + } + public function export(ZipFile $zip): void { Draft::query() @@ -37,12 +42,22 @@ protected function sanitize(Draft $draft): array ]); } + public static function anonymizeDescription(): string + { + return self::deleteDescription(); + } + public function anonymize(): void { // In the case of drafts, it makes no sense to keep them after a user is anonymized. $this->delete(); } + public static function deleteDescription(): string + { + return 'Delete all drafts created by the user.'; + } + public function delete(): void { Draft::query()