. /** * This file contains the dynamic interface. * * @package core_table * @copyright 2020 Simey Lameze * * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ declare(strict_types=1); namespace core_table; defined('MOODLE_INTERNAL') || die(); use moodle_url; use context; use core_table\local\filter\filterset; /** * Interface dynamic. * * @package core_table */ interface dynamic { /** * Take a string and convert it to the format expected by the table. * For example, you may have a format such as: * * mod_assign-submissions-[courseid] * * Passing this function an argument of [courseid] would return the fully-formed string. * * @param string $argument * @return string */ public static function get_unique_id_from_argument(string $argument): string; /** * Get the base url. * * @return moodle_url */ public function get_base_url(): moodle_url; /** * Set the filterset filters build table object. * * @param filterset $filterset The filterset object to get the filters from. * @return void */ public function set_filterset(filterset $filterset): void; /** * Get the currently defined filterset. * * @return filterset */ public function get_filterset(): ?filterset; /** * Get the context of the current table. * * Note: This function should not be called until after the filterset has been provided. * * @return context */ public function get_context(): ?context; }