Represents a radio selection.

This is used to build HTML code by using objects.

package | metaHTML

### Methods

## Constructor.

    __construct(String $name, array $elements, String $selectedElement)

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

### Parameters

#### $name

`String`

element name

#### $elements

`array`

list of elements array(label => value)

#### $selectedElement

`String`

value of selected element (optional, default none)

## Prints the HTML code for this element.

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

### Parameters

#### $module

`string`

Name of account module

#### $input

`array`

List of meta-HTML elements

#### $values

`array`

List of values which override the defaults in $input (name => value)

#### $restricted

`boolean`

If true then no buttons will be displayed

#### $tabindex

`integer`

Start value of tabulator index for input fields

#### $scope

`string`

Account type

### Returns

`array`List of input field names and their type (name => type)

## Returns the HTML attributes for the alignment.

    getAlignmentString() : String

Inherited

inherited_from | \htmlElement::getAlignmentString()

### Returns

`String`alignment HTML attributes (e.g. align="right" valign="top")

## Returns the HTML attribute for the colspan.

    getColspanString() : String

Inherited

inherited_from | \htmlElement::getColspanString()

### Returns

`String`colspan HTML attribute (e.g. colspan=3)

## Returns the HTML attribute for the rowspan.

    getRowspanString() : String

Inherited

inherited_from | \htmlElement::getRowspanString()

### Returns

`String`rowspan HTML attribute (e.g. rowspan=3)

## Returns the CSS classes of the surrounding table cell for this element.

    getTableCellCSSClasses() : array

Inherited

inherited_from | \htmlElement::getTableCellCSSClasses()

### Returns

`array`CSS classes

## Adds CSS classes to this element.

    setCSSClasses(array $classes)

Inherited

inherited_from | \htmlElement::setCSSClasses()

### Parameters

#### $classes

`array`

CSS class names

## Specifies if this component is enabled and accepts user modification.

    setIsEnabled(boolean $isEnabled)

### Parameters

#### $isEnabled

`boolean`

enabled if true

## Sets the JavaScript code for the onchange event.

    setOnchangeEvent(String $onchangeEvent)

### Parameters

#### $onchangeEvent

`String`

onchange event code (e.g. myfunction();)

## Adds CSS classes to the surrounding table cell for this element.

    setTableCellCSSClasses(array $classes)

Inherited

inherited_from | \htmlElement::setTableCellCSSClasses()

### Parameters

#### $classes

`array`

CSS class names

### Properties

## alignment when inside a table

    $alignment

Inherited

inherited_from | \htmlElement::$$alignment

## colspan if inside a table

    $colspan

Inherited

inherited_from | \htmlElement::$$colspan

## rowspan if inside a table

    $rowspan

Inherited

inherited_from | \htmlElement::$$rowspan

## CSS classes

    $cssClasses

Inherited

inherited_from | \htmlElement::$$cssClasses

## table cell CSS classes

    $tableCellCssClasses

Inherited

inherited_from | \htmlElement::$$tableCellCssClasses

## elements

    $elements

## enabled or disabled

    $isEnabled

## name of select field

    $name

## on change code

    $onchangeEvent

## selected element

    $selectedElement

### Constants

## align to bottom

    ALIGN_BOTTOM

Inherited

inherited_from | \htmlElement::ALIGN_BOTTOM

## align to center

    ALIGN_CENTER

Inherited

inherited_from | \htmlElement::ALIGN_CENTER

## align to left

    ALIGN_LEFT

Inherited

inherited_from | \htmlElement::ALIGN_LEFT

## align to right

    ALIGN_RIGHT

Inherited

inherited_from | \htmlElement::ALIGN_RIGHT

## align to top

    ALIGN_TOP

Inherited

inherited_from | \htmlElement::ALIGN_TOP

## validation rule to allow only numbers ([0-9]+)

    VALIDATE_NUMERIC

Inherited

inherited_from | \htmlElement::VALIDATE_NUMERIC