/** * 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); }
/** * @param Collection $collection * @return string */ protected function renderHiddenElement(Collection $collection) { if ($collection->getOption('count') == 0) { $hidden = $this->getView()->plugin('formHidden'); return $hidden($collection) . "\n"; } }