function renderInputSelect($name, $options, $attributes = array()) { $out = ''; foreach ($options as $value => $title) { $out .= sprintf('<option value="%s"%s>%s</option>', htmlentities($value, ENT_QUOTES, 'UTF-8'), $value == $this->getParam($name) ? ' selected="selected"' : '', htmlentities($title, ENT_QUOTES, 'UTF-8')); } $out = sprintf('<select name="%s"%s>%s</select>', $this->grid->getId() . '_' . $name, $this->renderAttributes($attributes), $out); return $out; }
function renderInputSelect($name, $options, $attributes = array()) { $out = ''; foreach ($options as $value => $title) { $out .= is_array($title) ? $this->_renderOptgroup($name, $value, $title) : $this->_renderOption($name, $value, $title); } $out = sprintf('<select name="%s"%s>%s</select>', $this->grid->getId() . '_' . $name, $this->renderAttributes($attributes), $out); return $out; }