Пример #1
0
 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;
 }
Пример #2
0
 public function renderBody(Entity $entity)
 {
     $title = $entity->getLabel() !== '' ? Entity::html('label', array(), htmlspecialchars($entity->getLabel())) : '';
     return $title . $entity->renderDescription() . $entity->renderErrors() . $this->renderChildren($entity, true) . Entity::html('table', array(), Entity::html('tbody', array(), $this->renderChildren($entity, false)));
 }
Пример #3
0
 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);
 }
Пример #4
0
 public function render(Entity $entity)
 {
     $attr = $this->attributes + array('id' => $entity->getId(), 'type' => $this->type, 'name' => $entity->getFullName());
     return Entity::html('button', $attr, htmlspecialchars($entity->getLabel()));
 }