protected function fill() { $this->setData(array()); $data = $this->_controller->getRequestAll(); foreach ($this->getElements() as $element) { $elementName = $element->getName(); if (isset($data[$elementName])) { $element->setValue($data[$elementName]); $this->addData($elementName, $data[$elementName]); } } }
public function fillAndIsValid() { $data = $this->_controller->getRequestAll(); $this->fill($data); return $this->isValid(); }