public function renderLabel(FieldInterface $field, $label = null, array $attributes = array())
{
if (null === $this->templates) {
$this->templates = $this->resolveResources($this->resources);
}
return $this->templates['label']->getBlock('label', array('id' => $field->getId(), 'key' => $field->getKey(), 'label' => null !== $label ? $label : ucfirst(strtolower(str_replace('_', ' ', $field->getKey()))), 'attributes' => $attributes));
}