metaHTML

# Class: htmlInputCheckbox

Source Location: /lib/html.inc

### Class Overview

    htmlElement
       |
       --htmlInputCheckbox

Prints the HTML code for a checkbox.

### Variables

- $checked
- $isEnabled
- $name
- $tableRowsToHide
- $tableRowsToShow

### Methods

- __construct
- generateHTML
- setIsEnabled
- setTableRowsToHide
- setTableRowsToShow

### Child classes:

htmlTableExtendedInputCheckbox
  Checkbox 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 1349]
Prints the HTML code for a checkbox.
[ Top ]

### Class Variables

#### $checked =

[line 1354]

value

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $isEnabled = true

[line 1356]

enabled or disabled

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $name =

[line 1352]

unique name of input element

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $tableRowsToHide = array()

[line 1358]

list of enclosing table rows to hide when checked

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $tableRowsToShow = array()

[line 1360]

list of enclosing table rows to show when checked

#### Tags:

access: | protected

Type: | mixed

[ Top ]

### Class Methods

### constructor __construct [line 1368]

`htmlInputCheckbox __construct( String $name, boolean $checked)`

Constructor.

Overridden in child classes as:

htmlTableExtendedInputCheckbox::__construct()
  Constructor.

#### Parameters:

String | $name | unique name
boolean | $checked | checked

[ Top ]

### method generateHTML [line 1384]

`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:

htmlTableExtendedInputCheckbox::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 1454]

`void setIsEnabled( boolean $isEnabled)`

Specifies if this component is enabled and accepts user modification.

#### Tags:

access: | public

#### Parameters:

boolean | $isEnabled | enabled if true

[ Top ]

### method setTableRowsToHide [line 1469]

`void setTableRowsToHide( array $tableRowsToHide)`

This will hide the given table rows when the checkbox is checked.

The given IDs can be of any e.g. input element. Starting from this element the first parent "<tr>" element will be used to show/hide.
Example: <tr><td><input type="checkbox" id="mycheckbox"></td></tr>
Using "mycheckbox" will use this "tr" to hide/show.

#### Tags:

access: | public

#### Parameters:

array | $tableRowsToHide | IDs of child elements to hide

[ Top ]

### method setTableRowsToShow [line 1484]

`void setTableRowsToShow( array $tableRowsToShow)`

This will show the given table rows when the checkbox is checked.

The given IDs can be of any e.g. input element. Starting from this element the first parent "<tr>" element will be used to show/hide.
Example: <tr><td><input type="checkbox" id="mycheckbox"></td></tr>
Using "mycheckbox" will use this "tr" to hide/show.

#### Tags:

access: | public

#### Parameters:

array | $tableRowsToShow | IDs of child elements to show

[ Top ]

Documentation generated on Sun, 25 Mar 2012 19:35:39 +0200 by phpDocumentor 1.4.1