Hello.
I think it is not a bug , it is feature or it is just how it works.
Some coder here:
unset($options['options']); <-- place about you are talking
> unset($options['config']);
>
> foreach ($options as $key => $value) {
> $method = 'set' . ucfirst($key);
>
> if (in_array($method, array('setTranslator', 'setPluginLoader',
> 'setView'))) {
> if (!is_object($value)) {
> continue;
> }
> }
>
> if (method_exists($this, $method)) {
> // Setter exists; use it
> $this->$method($value); <-- here is a problem if not unset
> options or config we have a problem ) Just calling setOptions method of the
> class again and again.
> } else {
> // Assume it's metadata
> $this->setAttrib($key, $value);
> }
> }
> return $this;
>
So you should not use options use something else:
$form->addElemen('myElement', 'my_name', array(
'label' => 'My Label',
'test' => array(
'argument' => 'for my view helper'
)
));
$formt->getElement(...)->getAttrib('test');