From cdbe00fb5ad15b3b27270f70e492f5d592bf5314 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20CHAZALLET?= Date: Fri, 16 Nov 2012 13:26:27 +0100 Subject: [PATCH] Modification de AbstractForm (corrections et maj) --- vendor/zf2biz/Custom/Form/AbstractForm.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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; -- 1.7.10.4