Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
declare(strict_types=1);
18
 
19
namespace customfield_number\privacy;
20
 
21
use core_customfield\data_controller;
22
use core_customfield\privacy\customfield_provider;
23
use core_privacy\local\metadata\null_provider;
24
use core_privacy\local\request\writer;
25
use stdClass;
26
 
27
/**
28
 * Plugin privacy provider
29
 *
30
 * @package    customfield_number
31
 * @copyright  2024 Paul Holden <paulh@moodle.com>
32
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
33
 */
34
class provider implements null_provider, customfield_provider {
35
 
36
    /**
37
     * Plugin language string identifier to explain why this plugin stores no data
38
     *
39
     * @return string
40
     */
41
    public static function get_reason(): string {
42
        return 'privacy:metadata';
43
    }
44
 
45
    /**
46
     * Preprocesses data object that is going to be exported
47
     *
48
     * @param data_controller $data
49
     * @param stdClass $exportdata
50
     * @param array $subcontext
51
     */
52
    public static function export_customfield_data(data_controller $data, stdClass $exportdata, array $subcontext): void {
53
        writer::with_context($data->get_context())->export_data($subcontext, $exportdata);
54
    }
55
 
56
    /**
57
     * Callback to clean up any related files prior to data record deletion
58
     *
59
     * @param string $select
60
     * @param array $params
61
     * @param int[] $contextids
62
     */
63
    public static function before_delete_data(string $select, array $params, array $contextids): void {
64
 
65
    }
66
 
67
    /**
68
     * Callback to clean up any related field prior to field record deletion
69
     *
70
     * @param string $select
71
     * @param array $params
72
     * @param int[] $contextids
73
     */
74
    public static function before_delete_fields(string $select, array $params, array $contextids): void {
75
 
76
    }
77
}