/**
  * Only render a template
  *
  * @param CollectionElement $collection
  * @return string
  */
 public function renderTemplate(CollectionElement $collection)
 {
     if ($sElementLayout = $collection->getOption('twb-layout')) {
         $elementOrFieldset = $collection->getTemplateElement();
         $elementOrFieldset->setOption('twb-layout', $sElementLayout);
     }
     return parent::renderTemplate($collection);
 }
예제 #2
0
 /**
  * @param Collection $collection
  * @return string
  */
 protected function renderHiddenElement(Collection $collection)
 {
     if ($collection->getOption('count') == 0) {
         $hidden = $this->getView()->plugin('formHidden');
         return $hidden($collection) . "\n";
     }
 }