metaHTML

# Class: htmlRadio

Source Location: /lib/html.inc

### Class Overview

    htmlElement
       |
       --htmlRadio

Represents a radio selection.

### Methods

- __construct
- generateHTML
- setIsEnabled

### Child classes:

htmlTableExtendedRadio
  Radio list with descriptive label and help link.

### Inherited Constants

#### Class: htmlElement

htmlElement::ALIGN_BOTTOM
htmlElement::ALIGN_CENTER
htmlElement::ALIGN_LEFT
htmlElement::ALIGN_RIGHT
htmlElement::ALIGN_TOP
htmlElement::VALIDATE_NUMERIC

### Inherited Variables

#### Class: htmlElement

htmlElement::$alignment
htmlElement::$colspan
htmlElement::$rowspan

### Inherited Methods

#### Class: htmlElement

htmlElement::generateHTML()
  Prints the HTML code for this element.
htmlElement::getAlignmentString()
  Returns the HTML attributes for the alignment.
htmlElement::getColspanString()
  Returns the HTML attribute for the colspan.
htmlElement::getRowspanString()
  Returns the HTML attribute for the rowspan.

### Class Details

[line 1092]
Represents a radio selection.
[ Top ]

### Class Methods

### constructor __construct [line 1114]

`htmlRadio __construct( String $name, array $elements, [array $selectedElement = null])`

Constructor.

Examples:
$radio = new htmlRadio('myName', array('label1' => 'value1', 'label2' => 'value2'), array('value1'));

Overridden in child classes as:

htmlTableExtendedRadio::__construct()
  Constructor.

#### Parameters:

String | $name | element name
array | $elements | list of elements array(label => value)
array | $selectedElement | value of selected element (optional, default none)

[ Top ]

### method generateHTML [line 1133]

`array generateHTML( string $module, array $input, array $values, boolean $restricted, &$tabindex, string $scope, integer $tabindex)`

Prints the HTML code for this element.

#### Tags:

return: | List of input field names and their type (name => type)

Overridden in child classes as:

htmlTableExtendedRadio::generateHTML()
  Prints the HTML code for this element.

Overrides htmlElement::generateHTML() (Prints the HTML code for this element.)

#### Parameters:

string | $module | Name of account module
array | $input | List of meta-HTML elements
array | $values | List of values which override the defaults in $input (name => value)
boolean | $restricted | If true then no buttons will be displayed
integer | $tabindex | Start value of tabulator index for input fields
string | $scope | Account type
| &$tabindex |

[ Top ]

### method setIsEnabled [line 1159]

`void setIsEnabled( boolean $isEnabled)`

Specifies if this component is enabled and accepts user modification.

#### Tags:

access: | public

#### Parameters:

boolean | $isEnabled | enabled if true

[ Top ]

Documentation generated on Tue, 22 Nov 2011 16:29:48 +0100 by phpDocumentor 1.4.1