Class mr_html_filter_abstract

Description

MR HTML Filter Abstract

  • author: Mark Nielsen
  • abstract:

Located in /html/filter/abstract.php (line 32)


	
			
Direct descendents
Class Description
mr_html_filter_autocomplete MR HTML Filter Autocomplete
mr_html_filter_autocompleteid MR HTML Filter Autocomplete with IDs
mr_html_filter_checkbox MR HTML Filter Checkbox
mr_html_filter_daterange MR HTML Filter Date Range
mr_html_filter_header MR HTML Filter Header
mr_html_filter_hidden MR HTML Filter hidden
mr_html_filter_numberrange MR HTML Filter Number Range
mr_html_filter_recent MR HTML Filter Recent
mr_html_filter_select MR HTML Filter Select
mr_html_filter_selectmulti MR HTML Filter Multiple Select
mr_html_filter_selectmultiplus Multi-select plus filter
mr_html_filter_text MR HTML Filter Text
mr_html_filter_textarea MR HTML Filter Text
Variable Summary
boolean $advanced
array $disabledif
string $field
array $helpbutton
string $label
string $name
Method Summary
mr_html_filter_abstract __construct (string $name, string $label, [bool $advanced = false], [string $field = NULL])
mr_html_filter_abstract add_disabledif (string $dependenton, [string $condition = 'notchecked'], [string $value = '1'])
mr_html_filter_abstract add_element (MoodleQuickForm $mform)
mr_html_filter_abstract add_elements (MoodleQuickForm $mform)
mr_html_filter_abstract add_helpbutton (string $identifier, [string $component = 'moodle'])
string get_element_name ()
string get_field ()
string get_name ()
mr_html_filter_abstract preferences_delete ([string $name = NULL])
mixed preferences_get (string $name)
mixed sql ()
string __toString ()
Variables
boolean $advanced (line 53)

If it should be flagged as advanced or not in the form

  • access: protected
array $disabledif = array() (line 81)

Element disabledIf parameters

  • access: protected
string $field (line 60)

SQL field name (if different from $name)

  • access: protected
array $helpbutton = array() (line 74)

Element help button parameters

  • access: protected
string $label (line 45)

Filter label in the form

  • access: protected
string $name (line 38)

The filter's name

  • access: protected
mr_preferences $preferences (line 67)

User preferences (filter values are stored here)

  • access: protected
Methods
Constructor __construct (line 91)

Construct

  • access: public
mr_html_filter_abstract __construct (string $name, string $label, [bool $advanced = false], [string $field = NULL])
  • string $name: Filter name
  • string $label: Filter label
  • bool $advanced: Filter advanced form setting
  • string $field: SQL field, defaults to $name

Redefined in descendants as:
add_disabledif (line 237)

Add disabledIf to this filter

  • access: public
mr_html_filter_abstract add_disabledif (string $dependenton, [string $condition = 'notchecked'], [string $value = '1'])
  • 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_element (line 282)

Add filter form element

  • abstract:
  • access: public
mr_html_filter_abstract add_element (MoodleQuickForm $mform)
  • MoodleQuickForm $mform: Filter form

Redefined in descendants as:
add_elements (line 252)

Add all elements for this filter

  • access: public
mr_html_filter_abstract add_elements (MoodleQuickForm $mform)
  • MoodleQuickForm $mform: The filter form

Redefined in descendants as:
add_helpbutton (line 221)

Add a help button to this filter

  • access: public
mr_html_filter_abstract add_helpbutton (string $identifier, [string $component = 'moodle'])
  • string $identifier: Help button text identifier
  • string $component: The plugin component
get_element_name (line 133)

Get the filter's primary form element's name

This is used to attach help buttons, disabledIfs, etc to the filter's element.

  • access: public
string get_element_name ()

Redefined in descendants as:
get_field (line 142)

Get SQL field name

  • access: public
string get_field ()
get_name (line 121)

Get the field's name

  • access: public
string get_name ()
preferences_defaults (line 151)

Filter defaults

  • access: public
array preferences_defaults ()

Redefined in descendants as:
preferences_delete (line 202)

Remove preferences for this filter

  • access: public
mr_html_filter_abstract preferences_delete ([string $name = NULL])
  • string $name: A specific preference to delete, if NULL all are deleted
preferences_get (line 173)

Get a preference value (default can be returned)

  • access: public
mixed preferences_get (string $name)
  • string $name: Preference name
preferences_init (line 161)

Preferences init

  • access: public
mr_html_filter_abstract preferences_init (mr_preferences $preferences)
preferences_update (line 185)

Update user preferences to current filter settings

  • access: public
mr_html_filter_abstract preferences_update (object $data)
  • object $data: Form data

Redefined in descendants as:
sql (line 289)

Generate this filter's SQL

  • abstract:
  • access: public
mixed sql ()

Redefined in descendants as:
__toString (line 108)

Convert this filter into a simple string

  • access: public
string __toString ()

Documentation generated on Thu, 28 Jun 2012 16:33:44 -0700 by phpDocumentor 1.4.3