Construct
mr_html_filter
__construct
(
mr_preferences $preferences,
moodle_url $url, [
string $formpath =
'local/mr/form/filter'])
-
mr_preferences
$preferences: Preferences model
-
moodle_url
$url: Base URL
-
string
$formpath: The patch to the form class, passed to mr_helper_load
Add disabledIf to a filter
mr_html_filter
add_disabledif
(
string $filtername,
string $dependenton, [
string $condition =
'notchecked'], [
string $value =
'1'])
-
string
$filtername: The filter's name
-
string
$dependenton: The name of the element whose state will be checked for condition
-
string
$condition: The condition to check
-
string
$value: Used in conjunction with condition.
Add a help button to a filter
mr_html_filter
add_helpbutton
(
string $filtername,
string $identifier, [
string $component =
'moodle'])
-
string
$filtername: The filter's name
-
string
$identifier: Help button text identifier
-
string
$component: The plugin component
After filters have been added, you can initialze the form and handle submitted data
Hook from
-
MoodleQuickForm
$mform
-
MoodleQuickForm
&$mform
Set a report to the filters
Return filter SQL and params
array
sql
()
Use this to add new filters to the filter model
Example: ->new_text(...args...);
-
string
$name: The name of the filter
-
array
$arguments: Filter args
Redefinition of:
- mr_readonly::__call()
- Provides dynamic get_{dataMember}() method access
Convert this filter into a simple string
string
__toString
()
Inherited Methods
Inherited From mr_readonly
mr_readonly::__call()