/** * @param null $value * @return void|Zend_Form_Element */ public function setValue($value = null) { if (!$value) { $path = $this->getPath(); if (empty($path)) { $this->setPath(); $path = $this->getPath(); } $value = $this->_getValue($path); } parent::setValue($value); }
protected function _required($text = ' - these fields are required') { $element = new Core_Form_Element_PlainText('required'); $element->setValue("<p class=\"required explain\">{$text}</p>"); $element->setDecorators(array('ViewHelper')); return $element; }