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

Public Member Functions

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

Data Fields

 $_text = ''

Detailed Description

HTML class for a radio type element

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 radio.php.


Member Function Documentation

Automatically generates and assigns an 'id' attribute for the element.

Currently used to ensure that labels work on radio buttons and checkboxes. Per idea of Alexander Radivanovich.

private

Returns:
void

Reimplemented from HTML_QuickForm_element.

Definition at line 73 of file radio.php.

Here is the call graph for this function:

exportValue ( &$  submitValues,
assoc = false 
)

Returns the value attribute if the radio is checked, null if it is not

Reimplemented from HTML_QuickForm_input.

Definition at line 245 of file radio.php.

Here is the call graph for this function:

Returns whether radio button is checked

Since:
1.0 public
Returns:
string

Definition at line 116 of file radio.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 MoodleQuickForm_radio.

Definition at line 153 of file radio.php.

Here is the call graph for this function:

getText ( )

Returns the radio text

Since:
1.1 public
Returns:
string

Definition at line 189 of file radio.php.

HTML_QuickForm_radio ( elementName = null,
elementLabel = null,
text = null,
value = null,
attributes = null 
)

Class constructor

Parameters:
stringInput field name attribute
mixedLabel(s) for a field
stringText to display near the radio
stringInput field value
mixedEither a typical HTML attribute string or an associative array
Since:
1.0 public
Returns:
void

Definition at line 60 of file radio.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.

Definition at line 207 of file radio.php.

Here is the call graph for this function:

setChecked ( checked)

Sets whether radio button is checked

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

Definition at line 97 of file radio.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setText ( text)

Sets the radio text

Parameters:
string$textText to display near the radio button
Since:
1.1 public
Returns:
void

Definition at line 174 of file radio.php.

toHtml ( )

Returns the radio element in HTML

Since:
1.0 public
Returns:
string

Reimplemented from HTML_QuickForm_input.

Reimplemented in MoodleQuickForm_radio.

Definition at line 131 of file radio.php.

Here is the call graph for this function:


Field Documentation

$_text = ''

Definition at line 43 of file radio.php.


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