Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
The base user filter class. More...
Public Member Functions | |
__construct ($name, $label, $advanced) | |
Constructor. More... | |
check_data ($formdata) | |
Retrieves data from the form data. More... | |
get_label ($data) | |
Returns a human friendly description of the filter used as label. More... | |
get_sql_filter ($data) | |
Returns the condition to be used with SQL where. More... | |
setupForm (&$mform) | |
Adds controls specific to this filter in the form. More... | |
user_filter_type ($name, $label, $advanced) | |
Old syntax of class constructor. More... | |
Public Attributes | |
bool | $_advanced |
Advanced form element flag. | |
string | $_label |
The label of this filter instance. | |
string | $_name |
The name of this filter instance. | |
The base user filter class.
All abstract classes must be implemented.
user_filter_type::__construct | ( | $name, | |
$label, | |||
$advanced | |||
) |
Constructor.
string | $name | the name of the filter instance |
string | $label | the label of the filter instance |
boolean | $advanced | advanced form element flag |
Reimplemented in user_filter_profilefield, user_filter_globalrole, and user_filter_courserole.
user_filter_type::check_data | ( | $formdata | ) |
Retrieves data from the form data.
stdClass | $formdata | data submited with the form |
mixed | array filter data or false when filter not set |
Reimplemented in user_filter_text, user_filter_simpleselect, user_filter_select, user_filter_profilefield, user_filter_globalrole, user_filter_date, user_filter_courserole, user_filter_cohort, and user_filter_checkbox.
user_filter_type::get_label | ( | $data | ) |
Returns a human friendly description of the filter used as label.
array | $data | filter settings |
string | active filter label |
Reimplemented in user_filter_text, user_filter_simpleselect, user_filter_select, user_filter_profilefield, user_filter_globalrole, user_filter_date, user_filter_courserole, user_filter_cohort, and user_filter_checkbox.
user_filter_type::get_sql_filter | ( | $data | ) |
Returns the condition to be used with SQL where.
array | $data | filter settings |
string | the filtering condition or null if the filter is disabled |
Reimplemented in user_filter_yesno, user_filter_text, user_filter_simpleselect, user_filter_select, user_filter_profilefield, user_filter_globalrole, user_filter_date, user_filter_courserole, user_filter_cohort, user_filter_checkbox, and user_filter_anycourses.
user_filter_type::setupForm | ( | & | $mform | ) |
Adds controls specific to this filter in the form.
moodleform | $mform | a MoodleForm object to setup |
Reimplemented in user_filter_text, user_filter_simpleselect, user_filter_select, user_filter_profilefield, user_filter_globalrole, user_filter_date, user_filter_courserole, user_filter_cohort, and user_filter_checkbox.
user_filter_type::user_filter_type | ( | $name, | |
$label, | |||
$advanced | |||
) |