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

Public Member Functions

 HTML_QuickForm_checkbox ($elementName=null, $elementLabel=null, $text='', $attributes=null)
 setChecked ($checked)
 getChecked ()
 toHtml ()
 getFrozenHtml ()
 setText ($text)
 getText ()
 setValue ($value)
 getValue ()
 onQuickFormEvent ($event, $arg, &$caller)
 exportValue (&$submitValues, $assoc=false)

Data Fields

 $_text = ''

Detailed Description

HTML class for a checkbox type field

Author:
Adam Daniel <adaniel1@eesus.jnj.com>
Bertrand Mansion <bmansion@mamasam.com>
Version:
1.1
Since:
PHP4.04pl1 public

Definition at line 33 of file checkbox.php.


Member Function Documentation

exportValue ( &$  submitValues,
assoc = false 
)

Return true if the checkbox is checked, null if it is not checked (getValue() returns false)

Reimplemented from HTML_QuickForm_input.

Reimplemented in HTML_QuickForm_advcheckbox.

Definition at line 257 of file checkbox.php.

Here is the call graph for this function:

Returns whether a checkbox is checked

Since:
1.0 public
Returns:
bool

Definition at line 99 of file checkbox.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the value of field without HTML tags

Since:
1.0 public
Returns:
string

Reimplemented from HTML_QuickForm_element.

Reimplemented in HTML_QuickForm_advcheckbox, MoodleQuickForm_advcheckbox, and MoodleQuickForm_checkbox.

Definition at line 137 of file checkbox.php.

Here is the call graph for this function:

getText ( )

Returns the checkbox text

Since:
1.1 public
Returns:
string

Definition at line 173 of file checkbox.php.

getValue ( )

Returns the value of the form element

Since:
1.0 public
Returns:
bool

Reimplemented from HTML_QuickForm_input.

Reimplemented in HTML_QuickForm_advcheckbox.

Definition at line 204 of file checkbox.php.

Here is the call graph for this function:

HTML_QuickForm_checkbox ( elementName = null,
elementLabel = null,
text = '',
attributes = null 
)

Class constructor

Parameters:
string$elementName(optional)Input field name attribute
string$elementLabel(optional)Input field value
string$text(optional)Checkbox display text
mixed$attributes(optional)Either a typical HTML attribute string or an associative array
Since:
1.0 public
Returns:
void

Definition at line 60 of file checkbox.php.

Here is the call graph for this function:

Here is the caller graph for this function:

onQuickFormEvent ( event,
arg,
&$  caller 
)

Called by HTML_QuickForm whenever form event is made on this element

Parameters:
string$eventName of event
mixed$argevent arguments
object$callercalling object
Since:
1.0 public
Returns:
void

Reimplemented from HTML_QuickForm_input.

Reimplemented in HTML_QuickForm_advcheckbox, and MoodleQuickForm_checkbox.

Definition at line 222 of file checkbox.php.

Here is the call graph for this function:

setChecked ( checked)

Sets whether a checkbox is checked

Parameters:
bool$checkedWhether the field is checked or not
Since:
1.0 public
Returns:
void

Definition at line 80 of file checkbox.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setText ( text)

Sets the checkbox text

Parameters:
string$text
Since:
1.1 public
Returns:
void

Definition at line 158 of file checkbox.php.

setValue ( value)

Sets the value of the form element

Parameters:
string$valueDefault value of the form element
Since:
1.0 public
Returns:
void

Reimplemented from HTML_QuickForm_input.

Reimplemented in HTML_QuickForm_advcheckbox.

Definition at line 189 of file checkbox.php.

Here is the call graph for this function:

toHtml ( )

Returns the checkbox element in HTML

Since:
1.0 public
Returns:
string

Reimplemented from HTML_QuickForm_input.

Reimplemented in HTML_QuickForm_advcheckbox, MoodleQuickForm_advcheckbox, and MoodleQuickForm_checkbox.

Definition at line 114 of file checkbox.php.

Here is the call graph for this function:


Field Documentation

$_text = ''

Definition at line 43 of file checkbox.php.


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