Пример #1
0
 /**
  * 以<radio>标签的形式输出
  * 
  * @param ZtChart_Model_DbTable_Role_Rowset $rowset
  * @param array $attributes
  */
 protected function _htmlRadio(ZtChart_Model_DbTable_Role_Rowset $rowset, $attributes = array())
 {
     if (isset($attributes['options'])) {
         $options = $attributes['options'];
         unset($attributes['options']);
     } else {
         $options = array();
     }
     $htmlRadio = new Zend_Form_Element_Radio(array_merge($this->_attributes['radio'], $attributes));
     $htmlRadio->clearDecorators()->addDecorator('ViewHelper');
     $htmlRadio->addMultiOptions($options);
     foreach ($rowset as $row) {
         $htmlRadio->addMultiOption($row->role_id, $row->role_name);
     }
     return $htmlRadio;
 }