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

Public Member Functions

 __construct ($name, $label, $advanced, $field, $disableelements=null)
 setupForm (MoodleQuickForm &$mform)
 check_data ($formdata)
 get_sql_filter ($data)
 get_label ($data)

Protected Attributes

 $disableelements = array()
 $field

Detailed Description

Generic filter based for checkbox and can be used for disabling items

Definition at line 35 of file checkbox.php.


Constructor & Destructor Documentation

__construct ( name,
label,
advanced,
field,
disableelements = null 
)

Constructor, initalize user_filter_type and sets $disableelements array with list of elements to be diabled by checkbox.

Parameters:
string$namethe name of the filter instance
string$labelthe label of the filter instance
boolean$advancedadvanced form element flag
mixed$fielduser table field/fields name for comparison
array$disableelementsname of fields which should be disabled if this checkbox is checked.

Definition at line 58 of file checkbox.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 98 of file checkbox.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 136 of file checkbox.php.

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 120 of file checkbox.php.

setupForm ( MoodleQuickForm &$  mform)

Adds controls specific to this filter in the form.

Parameters:
moodleform$mforma MoodleQuickForm object in which element will be added

Definition at line 75 of file checkbox.php.

Here is the call graph for this function:


Field Documentation

$disableelements = array() [protected]

Definition at line 40 of file checkbox.php.

$field [protected]

Definition at line 46 of file checkbox.php.


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