Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Filter base. More...
Static Public Member Functions | |
static | add_filter_to_form (\MoodleQuickForm &$mform) |
Add the form elements for the filter to the supplied form. More... | |
static | filter_matches (tour $tour, context $context) |
Check whether the filter matches the specified tour and/or context. More... | |
static | get_filter_name () |
The name of the filter. More... | |
static | get_filter_options () |
Retrieve the list of available filter options. More... | |
static | prepare_filter_values_for_form (tour $tour, stdClass $data) |
Prepare the filter values for the form. More... | |
static | save_filter_values_from_form (tour $tour, stdClass $data) |
Save the filter values from the form to the tour. More... | |
Public Attributes | |
const | ANYVALUE = '__ANYVALUE__' |
Any Value. | |
Filter base.
|
static |
Add the form elements for the filter to the supplied form.
MoodleQuickForm | $mform | The form to add filter settings to. |
Reimplemented in tool_usertours\local\filter\accessdate, and tool_usertours\local\filter\course.
Check whether the filter matches the specified tour and/or context.
tour | $tour | The tour to check |
context | $context | The context to check |
boolean |
Reimplemented in tool_usertours\local\filter\accessdate, tool_usertours\local\filter\category, tool_usertours\local\filter\course, tool_usertours\local\filter\courseformat, tool_usertours\local\filter\role, and tool_usertours\local\filter\theme.
|
static |
The name of the filter.
string |
Reimplemented in tool_usertours\local\filter\accessdate, tool_usertours\local\filter\category, tool_usertours\local\filter\course, tool_usertours\local\filter\courseformat, tool_usertours\local\filter\role, and tool_usertours\local\filter\theme.
|
static |
Retrieve the list of available filter options.
array | An array whose keys are the valid options |
Reimplemented in tool_usertours\local\filter\accessdate, tool_usertours\local\filter\category, tool_usertours\local\filter\courseformat, tool_usertours\local\filter\role, and tool_usertours\local\filter\theme.
|
static |
Prepare the filter values for the form.
tour | $tour | The tour to prepare values from |
stdClass | $data | The data value |
stdClass |
Reimplemented in tool_usertours\local\filter\accessdate, and tool_usertours\local\filter\course.
|
static |
Save the filter values from the form to the tour.
tour | $tour | The tour to save values to |
stdClass | $data | The data submitted in the form |
Reimplemented in tool_usertours\local\filter\accessdate, and tool_usertours\local\filter\course.