From: <gem...@li...> - 2011-11-18 14:18:51
|
Revision: 236 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=236&view=rev Author: mennodekker Date: 2011-11-18 14:18:45 +0000 (Fri, 18 Nov 2011) Log Message: ----------- Fix for problem with subforms and ->getValues() Modified Paths: -------------- trunk/library/classes/Gems/TabForm.php Modified: trunk/library/classes/Gems/TabForm.php =================================================================== --- trunk/library/classes/Gems/TabForm.php 2011-11-18 13:24:26 UTC (rev 235) +++ trunk/library/classes/Gems/TabForm.php 2011-11-18 14:18:45 UTC (rev 236) @@ -329,4 +329,25 @@ return $form; } + + /** + * Retrieve all form element values + * + * Fix for ZF error where subform values will be pushed into an array with key: formname + * for compatibility both are now in the result array + * + * @param bool $suppressArrayNotation + * @return array + */ + public function getValues($suppressArrayNotation = false) + { + $values = parent::getValues($suppressArrayNotation); + + foreach ($this->getSubForms() as $key => $subForm) { + $values[$key]; + $values = $this->_array_replace_recursive($values, $values[$key]); + } + + return $values; + } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |