## Class mr_html_filter_checkbox

Description

MR HTML Filter Checkbox

- author: Mark Nielsen
- author: Sam Chaffee

Located in /html/filter/checkbox.php (line 38)

    mr_html_filter_abstract
       |
       --mr_html_filter_checkbox

Variable Summary
string $checkedsql
int $default
string $rightlabel
string $uncheckedsql
Method Summary
mr_html_filter_checkbox __construct (string $name, string $label, [string $rightlabel = ''], [int $default = 0], [array $checkedsql = array()], [array $uncheckedsql = array()], [bool $advanced = false], [string $field = NULL])
void add_element ( $mform)
array preferences_defaults ()
void sql ()
Variables
string $checkedsql (line 58)

SQL for when the checkbox is unchecked

- access: protected

int $default (line 44)

Default state, checked/unchecked (0, 1)

- access: protected

string $rightlabel (line 51)

Right label

- access: protected

string $uncheckedsql (line 65)

SQL for when the checkbox is checked

- access: protected

#### Inherited Variables

Inherited from mr_html_filter_abstract

> mr_html_filter_abstract::$advanced
> mr_html_filter_abstract::$disabledif
> mr_html_filter_abstract::$field
> mr_html_filter_abstract::$helpbutton
> mr_html_filter_abstract::$label
> mr_html_filter_abstract::$name
> mr_html_filter_abstract::$preferences

Methods
Constructor __construct (line 79)

Checkbox filter constructor

- access: public

mr_html_filter_checkbox __construct (string $name, string $label, [string $rightlabel = ''], [int $default = 0], [array $checkedsql = array()], [array $uncheckedsql = array()], [bool $advanced = false], [string $field = NULL])

- string $name: Name for the filter instance
- string $label: Label to the left of the checkbox
- string $rightlabel: Label to the right of the checkbox
- int $default: The default state of the checkbox (0, 1)
- array $checkedsql: SQL to use when checked
- array $uncheckedsql: SQL to use when not checked
- bool $advanced: Whether or not the form element should be an advanced option
- string $field: The field to be used in the filter

Redefinition of:

mr_html_filter_abstract::__construct()
  Construct

add_element (line 100)

Add checkbox

- access: public

void add_element ( $mform)

- $mform

Redefinition of:

mr_html_filter_abstract::add_element()
  Add filter form element

preferences_defaults (line 93)

Filter defaults

- access: public

array preferences_defaults ()

Redefinition of:

mr_html_filter_abstract::preferences_defaults()
  Filter defaults

sql (line 114)

Limit by input value

- access: public

void sql ()

Redefinition of:

mr_html_filter_abstract::sql()
  Generate this filter's SQL

#### Inherited Methods

Inherited From mr_html_filter_abstract

> mr_html_filter_abstract::__construct()
> mr_html_filter_abstract::add_disabledif()
> mr_html_filter_abstract::add_element()
> mr_html_filter_abstract::add_elements()
> mr_html_filter_abstract::add_helpbutton()
> mr_html_filter_abstract::get_element_name()
> mr_html_filter_abstract::get_field()
> mr_html_filter_abstract::get_name()
> mr_html_filter_abstract::preferences_defaults()
> mr_html_filter_abstract::preferences_delete()
> mr_html_filter_abstract::preferences_get()
> mr_html_filter_abstract::preferences_init()
> mr_html_filter_abstract::preferences_update()
> mr_html_filter_abstract::sql()
> mr_html_filter_abstract::__toString()

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