MDL-68454 table: Improve documentation for dynamic table
[moodle.git] / lib / table / classes / dynamic.php
CommitLineData
88ba207d
SL
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/**
18 * This file contains the dynamic interface.
19 *
20 * @package core_table
21 * @copyright 2020 Simey Lameze <simey@moodle.com>
88ba207d
SL
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23 */
24
25declare(strict_types=1);
26
27namespace core_table;
28
88ba207d 29/**
685fe080
AN
30 * Interface to identify this table as a table which can be dynamically updated via webservice calls.
31 *
32 * For a table to be defined as dynamic it must meet the following requirements:
33 *
34 * # it must be located with a namespaced class of \[component]\table\[tablename]
35 * # it must define a \core_table\local\filter\filterset implementation in \[component]\table\[tablename]_filterset
36 * # it must override the {{guess_base_url}} function and specify a base URL to be used when constructing URLs
37 * # it must override the {{get_context}} function to specify the correct context
88ba207d
SL
38 *
39 * @package core_table
685fe080
AN
40 * @copyright 2020 Simey Lameze <simey@moodle.com>
41 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
88ba207d
SL
42 */
43interface dynamic {
88ba207d 44}