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);
    }