Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 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
namespace core_customfield;
18
 
19
use core\persistent;
20
 
21
/**
1441 ariadna 22
 * Customfield category persistent class
1 efrain 23
 *
1441 ariadna 24
 * @package   core_customfield
1 efrain 25
 * @copyright 2018 Toni Barbera <toni@moodle.com>
26
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
27
 */
28
class category extends persistent {
29
    /**
30
     * Database table.
31
     */
32
    const TABLE = 'customfield_category';
33
 
34
    /**
35
     * Return the definition of the properties of this model.
36
     *
37
     * @return array
38
     */
39
    protected static function define_properties(): array {
40
        return array(
41
                'name' => [
42
                        'type' => PARAM_TEXT,
43
                ],
44
                'description' => [
45
                        'type' => PARAM_RAW,
46
                        'optional' => true,
47
                        'default' => null,
48
                        'null' => NULL_ALLOWED
49
                ],
50
                'descriptionformat' => [
51
                        'type' => PARAM_INT,
52
                        'default' => FORMAT_MOODLE,
1441 ariadna 53
                        'optional' => true,
54
                        'null' => NULL_ALLOWED,
1 efrain 55
                ],
56
                'component' => [
57
                        'type' => PARAM_COMPONENT
58
                ],
59
                'area' => [
60
                        'type' => PARAM_COMPONENT
61
                ],
62
                'itemid' => [
63
                        'type' => PARAM_INT,
64
                        'optional' => true,
65
                        'default' => 0
66
                ],
67
                'contextid' => [
68
                        'type' => PARAM_INT,
69
                        'optional' => false
70
                ],
71
                'sortorder' => [
72
                        'type' => PARAM_INT,
73
                        'optional' => true,
1441 ariadna 74
                        'default' => -1,
75
                        'null' => NULL_ALLOWED,
1 efrain 76
                ],
77
        );
78
    }
79
}