From: Sébastien CHAZALLET Date: Fri, 16 Nov 2012 12:26:27 +0000 (+0100) Subject: Modification de AbstractForm (corrections et maj) X-Git-Url: http://git.inspyration.org/?p=zf2.biz%2Fgalerie.git;a=commitdiff_plain;h=cdbe00fb5ad15b3b27270f70e492f5d592bf5314 Modification de AbstractForm (corrections et maj) --- diff --git a/vendor/zf2biz/Custom/Form/AbstractForm.php b/vendor/zf2biz/Custom/Form/AbstractForm.php index f7f5249..d09c246 100644 --- a/vendor/zf2biz/Custom/Form/AbstractForm.php +++ b/vendor/zf2biz/Custom/Form/AbstractForm.php @@ -8,7 +8,7 @@ use Zend\I18n\Translator\TranslatorAwareInterface; use Zend\I18n\Translator\Translator; -class AbstractForm extends Form implements TranslatorAwareInterface +abstract class AbstractForm extends Form implements TranslatorAwareInterface { private $_translator = null; @@ -32,10 +32,19 @@ class AbstractForm extends Form implements TranslatorAwareInterface - protected function addElement($name, $type='text', $label=null, $attributes=array(), $options=array()) + + protected function addElements(array $paramsArray) + { + foreach($paramsArray as $params) { + $this->add($params); + } + } + + + protected function addElement($name, $type='text', $label=null, array $attributes=array(), array $options=array()) { if ($type) { - $attributes['type' = $type + $attributes['type'] = $type; } if ($label) { $options['label'] = $label;