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

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

Add an and respective options
public addOptGroup ( string $label, array $options ) : OptGroup
$label string
$options array
Результат OptGroup a reference to the added optgroup
    public function addOptGroup($label, $options)
    {
        if (empty($label)) {
            throw new \InvalidArgumentException(hsc('<optgroup> must have a label!'));
        }
        $this->optGroups[$label] = new OptGroup($label, $options);
        return end($this->optGroups);
    }