dokuwiki\Form\DropdownElement::options PHP Метод

options() публичный Метод

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
    public function options($options = null)
    {
        if ($options === null) {
            return $this->optGroups['']->options();
        }
        $this->optGroups[''] = new OptGroup(null, $options);
        return $this;
    }