Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | Public Attributes | List of all members
tool_usertours\local\filter\course Class Reference

Course filter. More...

Inheritance diagram for tool_usertours\local\filter\course:
tool_usertours\local\filter\base

Static Public Member Functions

static add_filter_to_form (\MoodleQuickForm &$mform)
 Overrides the base add form element with a course selector. 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)
 Overrides the base prepare the filter values for the form with an integer value. More...
 
static save_filter_values_from_form (tour $tour, stdClass $data)
 Overrides the base save the filter values from the form to the tour. More...
 

Public Attributes

const ANYVALUE = '__ANYVALUE__'
 Any Value.
 

Detailed Description

Course filter.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ add_filter_to_form()

static tool_usertours\local\filter\course::add_filter_to_form ( \MoodleQuickForm $mform)
static

Overrides the base add form element with a course selector.

Parameters
MoodleQuickForm$mform

Reimplemented from tool_usertours\local\filter\base.

◆ filter_matches()

static tool_usertours\local\filter\course::filter_matches ( tour  $tour,
context  $context 
)
static

Check whether the filter matches the specified tour and/or context.

Parameters
tour$tourThe tour to check
context$contextThe context to check
Return values
boolean

Reimplemented from tool_usertours\local\filter\base.

◆ get_filter_name()

static tool_usertours\local\filter\course::get_filter_name ( )
static

The name of the filter.

Return values
string

Reimplemented from tool_usertours\local\filter\base.

◆ get_filter_options()

static tool_usertours\local\filter\base::get_filter_options ( )
staticinherited

Retrieve the list of available filter options.

Return values
arrayAn array whose keys are the valid options

Reimplemented in tool_usertours\local\filter\theme, tool_usertours\local\filter\role, tool_usertours\local\filter\courseformat, and tool_usertours\local\filter\category.

◆ prepare_filter_values_for_form()

static tool_usertours\local\filter\course::prepare_filter_values_for_form ( tour  $tour,
stdClass  $data 
)
static

Overrides the base prepare the filter values for the form with an integer value.

Parameters
tour$tourThe tour to prepare values from
stdClass$dataThe data value
Return values
stdClass

Reimplemented from tool_usertours\local\filter\base.

◆ save_filter_values_from_form()

static tool_usertours\local\filter\course::save_filter_values_from_form ( tour  $tour,
stdClass  $data 
)
static

Overrides the base save the filter values from the form to the tour.

Parameters
tour$tourThe tour to save values to
stdClass$dataThe data submitted in the form

Reimplemented from tool_usertours\local\filter\base.


The documentation for this class was generated from the following file: