public function label($id, $title = null, array $options = array())
{
$defaults = array('escape' => true);
if (is_array($title)) {
list($title, $options) = each($title);
}
$title = $title ?: Inflector::humanize(str_replace('.', '_', $id));
list($name, $options, $template) = $this->_defaults(__FUNCTION__, $id, $options);
list($scope, $options) = $this->_options($defaults, $options);
if (strpos($id, '.')) {
$generator = $this->_config['attributes']['id'];
$id = $generator(__METHOD__, $id, $options);
}
return $this->_render(__METHOD__, $template, compact('id', 'title', 'options'), $scope);
}