public function renderBody(Entity $entity) { $legend = $entity->getLabel() ? Entity::html($entity->getParent() ? 'legend' : 'h2', array(), htmlspecialchars($entity->getLabel())) : ''; $markup = $legend . $entity->renderDescription() . $entity->renderErrors() . $this->renderChildren($entity, true) . Entity::html('dl', array('class' => 'zend_form'), $this->renderChildren($entity, false)); if ($entity->getParent()) { $markup = Entity::html('fieldset', array(), $markup); } return $markup; }