_element, $name);
}
/**
*
* render the form element
*
* @return string
*/
public function render()
{
$output = null;
$value = $this->getValue();
$translate = $this->getTranslate();
$multiple = '';
if (count((array)$this->_multiOptions) > 1 || $this->getMultiple() === true) {
$multiple = $this->_brackets;
}
$output .= '_endTag;
foreach ((array)$this->_multiOptions as $key => $option) {
$checked = (in_array($key, (array)$value)) ? 'checked="checked"' : '';
if (is_array($option)) {
$title = isset($option[0]) ? $option[0] : null;
$description = isset($option[1]) ? $option[1] : null;
if (isset($option[2])) {
$this->addMultiOptionAttributes($key, $option[2]);
}
}
else {
$title = $option;
$description = null;
}
$attributes = array(
'type="' . $this->_element . '"',
'name="' . $this->_name . $multiple . '"',
'value="' . $key . '"',
$this->renderAttributes(),
$this->renderOptionAttributes($key),
$checked,
);
$output .= ''
. "\n";
}
return $output;
}
}