hc/RadioButtons.php
/**
     * Format HTML component to HTML string 
     * @return string
     */
Format HTML component to HTML string
@return string
Format HTML component to HTML string @return string
public function toHtml() {
        if (empty($this->_radio_options) || empty($this->_radio_name)) {
            return '';
        }
        $html = '';
        $item = '<input type="radio" name="' . $this->_radio_name . '" value="';
        $checked = $this->_checked_item;
        foreach ($this->_radio_options as $key => $value) {
            $html .= $item . $key;
            if ($checked == $key) {
                $html .= '" checked="checked">';
            } else {
                $html .= '">';
            }
            $html .= $value;
        }
        return $html;
    }
public function toHtml ( ) { if ( empty ( $ this -> _radio_options ) || empty ( $ this -> _radio_name ) ) { return '' ; } $ html = '' ; $ item = '<input type="radio" name="' . $ this -> _radio_name . '" value="' ; $ checked = $ this -> _checked_item ; foreach ( $ this -> _radio_options as $ key => $ value ) { $ html .= $ item . $ key ; if ( $ checked == $ key ) { $ html .= '" checked="checked">' ; } else { $ html .= '">' ; } $ html .= $ value ; } return $ html ; }
Format HTML component to HTML string
 @return string
Format HTML component to HTML string @return string