public function checkbox($name, array $options = array())
{
$defaults = array('value' => '1', 'hidden' => true);
$options += $defaults;
$default = $options['value'];
$key = $name;
$out = '';
list($name, $options, $template) = $this->_defaults(__FUNCTION__, $name, $options);
list($scope, $options) = $this->_options($defaults, $options);
if (!isset($options['checked'])) {
$options['checked'] = $this->binding($key)->data == $default;
}
if ($scope['hidden']) {
$out = $this->hidden($name, array('value' => '', 'id' => false));
}
$options['value'] = $scope['value'];
return $out . $this->_render(__METHOD__, $template, compact('name', 'options'));
}