/** * Add optgroup element * * @param string $label The optgroup's label * @return \ValidFormBuilder\SelectGroup */ public function addGroup($label) { $objGroup = new SelectGroup($label); $objGroup->setMeta("parent", $this, true); $this->__options->addObject($objGroup); return $objGroup; }