Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 57... Línea 57...
57
     * field_controller and data_controller
57
     * field_controller and data_controller
58
     *
58
     *
59
     * @param int $id
59
     * @param int $id
60
     * @param \stdClass|null $record
60
     * @param \stdClass|null $record
61
     */
61
     */
62
    protected function __construct(int $id = 0, \stdClass $record = null) {
62
    protected function __construct(int $id = 0, ?\stdClass $record = null) {
63
        $this->category = new category($id, $record);
63
        $this->category = new category($id, $record);
64
    }
64
    }
Línea 65... Línea 65...
65
 
65
 
66
    /**
66
    /**
Línea 75... Línea 75...
75
     * @param handler|null $handler
75
     * @param handler|null $handler
76
     * @return category_controller
76
     * @return category_controller
77
     * @throws \moodle_exception
77
     * @throws \moodle_exception
78
     * @throws \coding_exception
78
     * @throws \coding_exception
79
     */
79
     */
80
    public static function create(int $id, \stdClass $record = null, handler $handler = null): category_controller {
80
    public static function create(int $id, ?\stdClass $record = null, ?handler $handler = null): category_controller {
81
        global $DB;
81
        global $DB;
82
        if ($id && $record) {
82
        if ($id && $record) {
83
            // This warning really should be in persistent as well.
83
            // This warning really should be in persistent as well.
84
            debugging('Too many parameters, either id need to be specified or a record, but not both.',
84
            debugging('Too many parameters, either id need to be specified or a record, but not both.',
85
                DEBUG_DEVELOPER);
85
                DEBUG_DEVELOPER);