Moodle  2.2.1
http://www.collinsharper.com
user_filter_select Class Reference
Inheritance diagram for user_filter_select:
Collaboration diagram for user_filter_select:

Public Member Functions

 user_filter_select ($name, $label, $advanced, $field, $options, $default=null)
 get_operators ()
 setupForm (&$mform)
 check_data ($formdata)
 get_sql_filter ($data)
 get_label ($data)

Data Fields

 $_options
 $_field
 $_default

Detailed Description

Generic filter based on a list of values.

Definition at line 8 of file select.php.


Member Function Documentation

check_data ( formdata)

Retrieves data from the form data

Parameters:
object$formdatadata submited with the form
Returns:
mixed array filter data or false when filter not set

Reimplemented from user_filter_type.

Definition at line 67 of file select.php.

get_label ( data)

Returns a human friendly description of the filter used as label.

Parameters:
array$datafilter settings
Returns:
string active filter label

Reimplemented from user_filter_type.

Definition at line 114 of file select.php.

Here is the call graph for this function:

Returns an array of comparison operators

Returns:
array of comparison operators

Definition at line 38 of file select.php.

Here is the caller graph for this function:

get_sql_filter ( data)

Returns the condition to be used with SQL where

Parameters:
array$datafilter settings
Returns:
array sql string and $params

Reimplemented from user_filter_type.

Definition at line 84 of file select.php.

setupForm ( &$  mform)

Adds controls specific to this filter in the form.

Parameters:
object$mforma MoodleForm object to setup

Reimplemented from user_filter_type.

Definition at line 48 of file select.php.

user_filter_select ( name,
label,
advanced,
field,
options,
default = null 
)

Constructor

Parameters:
string$namethe name of the filter instance
string$labelthe label of the filter instance
boolean$advancedadvanced form element flag
string$fielduser table filed name
array$optionsselect options
mixed$defaultoption

Definition at line 27 of file select.php.

Here is the call graph for this function:


Field Documentation

$_default

Definition at line 16 of file select.php.

$_field

Definition at line 14 of file select.php.

$_options

options for the list values

Definition at line 12 of file select.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations