__construct()
generateHTML()
getAlignmentString()
getColspanString()
getRowspanString()
setContainsOptgroups()
setHasDescriptiveElements()
setIsEnabled()
setMultiSelect()
setOnchangeEvent()
setRightToLeftTextDirection()
setSortElements()
setTransformSingleSelect()
setTransient()
setWidth()
printOptionsHTML()
$alignment
$colspan
$rowspan
$containsOptgroups
$elements
$hasDescriptiveElements
$isEnabled
$multiSelect
$name
$onchangeEvent
$rightToLeftTextDirection
$selectedElements
$size
$sortElements
$transformSingleSelect
$transient
$width
ALIGN_BOTTOM
ALIGN_CENTER
ALIGN_LEFT
ALIGN_RIGHT
ALIGN_TOP
VALIDATE_NUMERIC
Represents a select box.
This is used to build HTML code by using objects.
| package | metaHTML |
|---|
__construct(String $name, array $elements, array $selectedElements, int $size)
Examples:
$select = new htmlSelect('myName', array('value1', 'value2'), array('value1'));
$select = new htmlSelect('myName', array('label1' => 'value1', 'label2' => 'value2'), array('value1'));
$select->setHasDescriptiveElements(true);
$select = new htmlSelect('myName', array('optgroupLabel' => array('value1', 'value2')), array('value1'));
$select->setHasDescriptiveElements(true);
$select->setContainsOptgroups(true);
Stringelement name
arraylist of elements array(label => value) or array(value1, value2) or array('optgroup' => array(...))
arraylist of selected elements (optional, default none)
intsize (optional, default = 1)
generateHTML(string $module, array $input, array $values, boolean $restricted, integer $tabindex, string $scope) : array
stringName of account module
arrayList of meta-HTML elements
arrayList of values which override the defaults in $input (name => value)
booleanIf true then no buttons will be displayed
integerStart value of tabulator index for input fields
stringAccount type
arrayList of input field names and their type (name => type)getAlignmentString() : String
| inherited_from | \htmlElement::getAlignmentString() |
|---|
Stringalignment HTML attributes (e.g. align="right" valign="top")getColspanString() : String
| inherited_from | \htmlElement::getColspanString() |
|---|
Stringcolspan HTML attribute (e.g. colspan=3)getRowspanString() : String
| inherited_from | \htmlElement::getRowspanString() |
|---|
Stringrowspan HTML attribute (e.g. rowspan=3)setContainsOptgroups(boolean $containsOptgroups)
booleanactivates optgroups
setHasDescriptiveElements(boolean $hasDescriptiveElements)
booleanactivates descriptive elements
setIsEnabled(boolean $isEnabled)
booleanenabled if true
setMultiSelect(boolean $multiSelect)
booleanallows multi-selection
setOnchangeEvent(String $onchangeEvent)
Stringonchange event code (e.g. myfunction();)
setRightToLeftTextDirection(boolean $rightToLeftTextDirection)
booleanif true use right to left direction
setSortElements(boolean $sortElements)
booleansort elements
setTransformSingleSelect(boolean $transformSingleSelect)
booleantransform single options to text
setTransient(boolean $transient)
booleantransient field
setWidth(String $width)
Stringwidth (e.g. 20em)
printOptionsHTML(array $elements)
arraylist of options
$alignment
| inherited_from | \htmlElement::$$alignment |
|---|
$colspan
| inherited_from | \htmlElement::$$colspan |
|---|
$rowspan
| inherited_from | \htmlElement::$$rowspan |
|---|
$containsOptgroups
$elements
$hasDescriptiveElements
$isEnabled
$multiSelect
$name
$onchangeEvent
$rightToLeftTextDirection
$selectedElements
$size
$sortElements
$transformSingleSelect
$transient
$width
ALIGN_BOTTOM
| inherited_from | \htmlElement::ALIGN_BOTTOM |
|---|
ALIGN_CENTER
| inherited_from | \htmlElement::ALIGN_CENTER |
|---|
ALIGN_LEFT
| inherited_from | \htmlElement::ALIGN_LEFT |
|---|
ALIGN_RIGHT
| inherited_from | \htmlElement::ALIGN_RIGHT |
|---|
ALIGN_TOP
| inherited_from | \htmlElement::ALIGN_TOP |
|---|
VALIDATE_NUMERIC
| inherited_from | \htmlElement::VALIDATE_NUMERIC |
|---|