PHP Class dokuwiki\Form\OptGroup

Inheritance: extends dokuwiki\Form\Element
Datei anzeigen Open project: splitbrain/dokuwiki

Protected Properties

Property Type Description
$options
$value

Public Methods

Method Description
__construct ( string $label, array $options )
options ( null | array $options = null ) Get or set the options of the optgroup
storeValue ( string $value ) : boolean Store the given value so it can be used during rendering
toHTML ( ) : string The HTML representation of this element

Protected Methods

Method Description
renderOptions ( ) : string

Method Details

__construct() public method

public __construct ( string $label, array $options )
$label string The label text for this element (will be autoescaped)
$options array The available options

options() public method

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, ... ) )
public options ( null | array $options = null )
$options null | array

renderOptions() protected method

protected renderOptions ( ) : string
return string

storeValue() public method

This is intended to be only called from within @see DropdownElement::val()
public storeValue ( string $value ) : boolean
$value string
return boolean true if an option with the given value exists, false otherwise

toHTML() public method

The HTML representation of this element
public toHTML ( ) : string
return string

Property Details

$options protected_oe property

protected $options

$value protected_oe property

protected $value