[ Index ]

PHP Cross Reference of DokuWiki




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

(no description)

File Size: 111 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

storeValue($value)   X-Ref
Store the given value so it can be used during rendering

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

return: bool true if an option with the given value exists, false otherwise
param: string $value

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, ...

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

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

return: string

renderOptions()   X-Ref

return: string