public function Checkbox($name, $value = null, $attribs = null) {
$info = $this->_getInfo($name, $value, $attribs);
extract($info);
$checked = '';
if (isset($attribs['checked']) && $attribs['checked']) {
$checked = ' checked="checked"';
unset($attribs['checked']);
} elseif (isset($attribs['checked'])) {
unset($attribs['checked']);
}
$disabled = '';
if ($disable) {
$disabled = ' disabled="disabled"';
}
$endTag = ' />';
if (($this->view instanceof Zend_View_Abstract) && !$this->view->doctype()->isXhtml()) {
$endTag= '>';
}
$xhtml .= '<input type="hidden"'
. ' name="' . $this->view->escape($name) . '"'
. ' value="0"'
. $endTag;
$xhtml .= '<input type="checkbox"'
. ' name="' . $this->view->escape($name) . '"'
. ' id="' . $this->view->escape($id) . '"'
. ' value="' . $this->view->escape($value) . '"'
. $checked
. $disabled
. $this->_htmlAttribs($attribs)
. $endTag;
return $xhtml;
}