public function addOptgroup($label, $attributes = null)
    {
        $optgroup = new HTML_QuickForm2_Element_Select_Optgroup(
                            $this->values, $this->possibleValues,
                            $label, $attributes
                        );
        $this->options[] = $optgroup;
        return $optgroup;
    }
public function addOptgroup($label, $attributes = null)
    {
        $optgroup = new HTML_QuickForm2_Element_Select_Optgroup(
                            $this->values, $this->possibleValues,
                            $label, $attributes
                        );
        $this->options[] = $optgroup;
        return $optgroup;
    }
public function addOptgroup ( $ label , $ attributes = null ) { $ optgroup = new HTML_QuickForm2_Element_Select_Optgroup ( $ this -> values , $ this -> possibleValues , $ label , $ attributes ) ; $ this -> options [ ] = $ optgroup ; return $ optgroup ; }
Adds a new optgroup

@param    string  'label' attribute for optgroup tag
@param    mixed   Additional attributes for <optgroup> tag (either as a
string or as an associative array)
@return   HTML_QuickForm2_Element_Select_Optgroup
Adds a new optgroup