[ Index ]

PHP Cross Reference of DokuWiki




/inc/Form/ -> OptGroup.php (summary)

(no description)

File Size: 122 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

OptGroup:: (5 methods):

Class: OptGroup  - X-Ref

__construct($label, $options)   X-Ref

param: string $label The label text for this element (will be autoescaped)
param: array $options The available options

storeValues($values)   X-Ref
Store the given values so they can be used during rendering

This is intended to be only called from within DropdownElement::val()

param: string[] $values the values to set
return: string[] the values that have been set (options exist)
see: DropdownElement::val()

options($options = null)   X-Ref
Get or set the options of the optgroup

Options can be given as associative array (value => label) or as an
indexd array (label = value) or as an array of arrays. In the latter
case an element has to look as follows:
option-value => array (
'label' => option-label,
'attrs' => array (
attr-key => attr-value, ...

param: null|array $options
return: $this|array

toHTML()   X-Ref
The HTML representation of this element

return: string

renderOptions()   X-Ref

return: string