protected function getOptions()
{
$arrOptions = array();
$blnHasGroups = false;
foreach ($this->arrOptions as $i => $arrOption) {
if ($arrOption['group']) {
if ($blnHasGroups) {
$arrOptions[] = array('type' => 'group_end');
}
$arrOptions[] = array('type' => 'group_start', 'label' => \StringUtil::specialchars($arrOption['label']));
$blnHasGroups = true;
} else {
$arrOptions[] = array_replace($arrOption, array('type' => 'option', 'name' => $this->strName, 'id' => $this->strId . '_' . $i, 'value' => $arrOption['value'], 'checked' => $this->isChecked($arrOption), 'attributes' => $this->getAttributes(), 'label' => $arrOption['label']));
}
}
if ($blnHasGroups) {
$arrOptions[] = array('type' => 'group_end');
}
return $arrOptions;
}