public function renderNormal(Entity $entity) { $attr = array('class' => $entity->getWrapperClass()); return Entity::html('tr', $attr, Entity::html('td', array(), $entity->isLabelOutside() ? $entity->renderLabel() : ' ') . Entity::html('td', array(), $entity->render() . $entity->renderDescription() . $entity->renderErrors())); }
public function render(Entity $entity) { $legend = $entity->getLabel() !== '' ? Entity::html('legend', array(), htmlspecialchars($entity->getLabel())) : ''; $markup = $legend . $entity->renderDescription() . $entity->renderErrors() . $this->renderChildren($entity); return Entity::html('fieldset', $this->attributes, $markup); }
public function renderNormal(Entity $entity) { $attr = array('id' => $entity->getId() . '-label', 'class' => $entity->getWrapperClass()); return Entity::html('dt', $attr, $entity->isLabelOutside() ? $entity->renderLabel() : '') . Entity::html('dd', array('id' => $entity->getId() . '-element'), $entity->render() . $entity->renderDescription() . $entity->renderErrors()); }
public function renderBody(Entity $entity) { $title = $entity->getLabel() !== '' ? Entity::html('label', array(), htmlspecialchars($entity->getLabel())) : ''; return $title . $entity->renderDescription() . $entity->renderErrors() . $this->renderChildren($entity); }
public function renderNormal(Entity $entity) { $attr = array('class' => $entity->getWrapperClass()); $markup = ($entity->isLabelOutside() ? $entity->renderLabel() : '') . $entity->render() . $entity->renderDescription() . $entity->renderErrors(); return Entity::html('div', $attr, $markup); }