protected function _make($type, $return = false) { $value_check = $this->extractAttrib('value_check'); $value = $this->extractAttrib('value'); if (empty($value)) { $value = 1; } elseif ($value_check) { $this->setAttrib('checked', true); } $out = "<input type=\"{$type}\" "; $out .= QUI::renderIdAndName($this); $out .= 'value="' . htmlspecialchars($value) . '" '; $out .= QUI::renderAttribs($this); $out .= QUI::renderDisabled($this); $out .= QUI::renderChecked($this); $out .= '/>'; $caption = $this->extractAttrib('caption'); if ($caption) { $attribs = array('for' => $this->id(), 'caption' => $caption); $label = QUI::control($this->context, 'label', $this->id() . '_label', $attribs); $out .= "\n" . $label->render(true); } if ($return) { return $out; } else { echo $out; return null; } }