form::optgroup PHP Method

optgroup() protected static method

protected static optgroup ( $options, $label, $selected )
    protected static function optgroup($options, $label, $selected)
    {
        $html = array();
        foreach ($options as $value => $display) {
            $html[] = static::option($value, $display, $selected);
        }
        return Html::element('optgroup', implode('', $html), array('label' => Html::entities($label)));
    }