\n") { $info = $this->_getInfo($name, $value, $attribs, $options, $listsep); extract($info); // name, value, attribs, options, listsep, disable // retrieve attributes for labels (prefixed with 'label_') $label_attribs = array('style' => 'white-space: nowrap;'); foreach ($attribs as $key => $val) { if (substr($key, 0, 6) == 'label_') { $tmp = substr($key, 6); $label_attribs[$tmp] = $val; unset($attribs[$key]); } } // the radio button values and labels settype($options, 'array'); // default value if none are checked $xhtml = $this->_hidden($name, null); // build the element if ($disable) { // disabled. // show the radios as a plain list. $list = array(); // create the list of radios. foreach ($options as $opt_value => $opt_label) { if ($opt_value == $value) { // add a return value, and a checked text. $opt = $this->_hidden($name, $opt_value) . '[x]'; } else { // not checked $opt = '[ ]'; } $list[] = $opt . ' ' . $opt_label; } $xhtml .= implode($listsep, $list); } else { // enabled. // the array of all radios. $list = array(); // add radio buttons to the list. foreach ($options as $opt_value => $opt_label) { // begin the label wrapper $radio = '_htmlAttribs($label_attribs) . '>' . '_htmlAttribs($attribs) . ' />' . $this->view->escape($opt_label) . ''; // add to the array of radio buttons $list[] = $radio; } // done! $xhtml .= implode($listsep, $list); } return $xhtml; } }