protected function renderOptions()
{
$html = '';
foreach ($this->options as $key => $val) {
$selected = $key == $this->value ? ' selected="selected"' : '';
$attrs = '';
if (!empty($val['attrs']) && is_array($val['attrs'])) {
$attrs = buildAttributes($val['attrs']);
}
$html .= '<option' . $selected . ' value="' . hsc($key) . '" ' . $attrs . '>' . hsc($val['label']) . '</option>';
}
return $html;
}