X-Git-Url: http://git.inspyration.org/?p=zf2.biz%2Fgalerie.git;a=blobdiff_plain;f=vendor%2Fzf2biz%2FCustom%2FForm%2FAbstractForm.php;h=d09c246cc30950fcb6f478315aecd4412adce640;hp=f7f5249e49913c2397d982ae9f6e32bb7edeb7bc;hb=cdbe00fb5ad15b3b27270f70e492f5d592bf5314;hpb=0043e8327c1a6508c2ccced94e4f818828c95acf 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;