/** * FieldList::forTemplate() returns a concatenation of FieldHolder values. */ public function testForTemplate() { $set = new FieldList($a = new TextField('A'), $b = new TextField('B')); $this->assertEquals($a->FieldHolder() . $b->FieldHolder(), $set->forTemplate()); }
public function FieldHolder($properties = array()) { if ($this->getConfig('showcalendar')) { // TODO Replace with properly extensible view helper system $d = DateField_View_JQuery::create($this); if (!$d->regionalSettingsExist()) { $dateformat = $this->getConfig('dateformat'); // if no localefile is present, the jQuery DatePicker // month- and daynames will default to English, so the date // will not pass Zend validatiobn. We provide a fallback if (preg_match('/(MMM+)|(EEE+)/', $dateformat)) { $this->setConfig('dateformat', $this->getConfig('datavalueformat')); } } $d->onBeforeRender(); } $html = parent::FieldHolder(); if (!empty($d)) { $html = $d->onAfterRender($html); } return $html; }