From cb11fbfd26559e7bd4f8699143227a6d5855478a Mon Sep 17 00:00:00 2001
From: Philipp Memmel <philipp.memmel@gmail.com>
Date: Wed, 15 Jun 2022 18:44:06 +0200
Subject: [PATCH] Added privacy provider for lifecycletrigger_categories

---
 .../categories/classes/privacy/provider.php   | 40 +++++++++++++++++++
 .../lang/de/lifecycletrigger_categories.php   |  1 +
 .../lang/en/lifecycletrigger_categories.php   |  1 +
 3 files changed, 42 insertions(+)
 create mode 100644 trigger/categories/classes/privacy/provider.php

diff --git a/trigger/categories/classes/privacy/provider.php b/trigger/categories/classes/privacy/provider.php
new file mode 100644
index 0000000..19da3d6
--- /dev/null
+++ b/trigger/categories/classes/privacy/provider.php
@@ -0,0 +1,40 @@
+<?php
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+namespace lifecycletrigger_categories\privacy;
+
+use core_privacy\local\metadata\null_provider;
+
+/**
+ * Privacy subsystem implementation for lifecycletrigger_categories.
+ *
+ * @package     lifecycletrigger_categories
+ * @copyright   2022 ISB Bayern
+ * @author      Philipp Memmel
+ * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+class provider implements null_provider {
+
+    /**
+     * Get the language string identifier with the component's language
+     * file to explain why this plugin stores no data.
+     *
+     * @return string the reason
+     */
+    public static function get_reason() : string {
+        return 'privacy:metadata';
+    }
+}
diff --git a/trigger/categories/lang/de/lifecycletrigger_categories.php b/trigger/categories/lang/de/lifecycletrigger_categories.php
index 4711e72..fcec137 100644
--- a/trigger/categories/lang/de/lifecycletrigger_categories.php
+++ b/trigger/categories/lang/de/lifecycletrigger_categories.php
@@ -23,6 +23,7 @@
  */
 
 $string['pluginname'] = 'Kategorie-Trigger';
+$string['privacy:metadata'] = 'Dieses Subplugin speichert keine persönlichen Daten.';
 
 $string['categories'] = 'Kategorien, für die der Workflow ausgelöst werden soll.';
 $string['categories_noselection'] = 'Bitte wählen sie mindestens eine Kategorie aus.';
diff --git a/trigger/categories/lang/en/lifecycletrigger_categories.php b/trigger/categories/lang/en/lifecycletrigger_categories.php
index 178e036..423bd48 100644
--- a/trigger/categories/lang/en/lifecycletrigger_categories.php
+++ b/trigger/categories/lang/en/lifecycletrigger_categories.php
@@ -23,6 +23,7 @@
  */
 
 $string['pluginname'] = 'Categories trigger';
+$string['privacy:metadata'] = 'This subplugin does not store any personal data.';
 
 $string['categories'] = 'Categories, for which the workflow should be triggered';
 $string['categories_noselection'] = 'Please choose at least one category.';
-- 
GitLab