Ejemplo n.º 1
0
 /**
  * Render a collection by iterating through all fieldsets and elements
  *
  * @param  ElementInterface $element
  * @return string
  */
 public function render(ElementInterface $element, $wrap = false)
 {
     if (!$element instanceof Collection) {
         $helper = $element instanceof FieldsetInterface ? $this->getFieldsetHelper() : $this->getElementHelper();
         return $helper($element);
     }
     $markup = parent::render($element);
     if ($wrap) {
         $attrs = $this->createAttributesString($element->getAttributes());
         $markup = sprintf('<div%s>%s</div>', $attrs ? ' ' . $attrs : '', $markup);
     }
     return $markup;
 }
Ejemplo n.º 2
0
 public function render(ElementInterface $element)
 {
     $fielset = parent::render($element);
     $replace = str_replace(array("<fieldset>", "</fieldset>"), "", $fielset);
     return $replace;
 }
Ejemplo n.º 3
0
 public function render(ElementInterface $oElement)
 {
     $name = Helper::camelCase($oElement->getName());
     $allow_add = $oElement->getOption('allow_add');
     $allow_remove = $oElement->getOption('allow_remove');
     $class = $allow_add || $allow_remove ? "addremove" : "";
     $addnew = $allow_add ? sprintf(self::$addNew, $name) : "";
     $markup = $allow_add ? sprintf(self::$outputFormat, $addnew, parent::render($oElement), $class) : parent::render($oElement);
     return $markup;
 }
 public function render(ElementInterface $element)
 {
     return sprintf('<table  class="table table-condensed">%s</table>', parent::render($element));
 }