doctrine/DoctrineModule — pull request #446 by matwright (2014-11-01 10:54:33+00:00)
Title: adding functionality to support dynamic valueOption attributes

A feature of ZF2 form elements with valueOptions is being able to set attributes on a valueOption
```
$select=new \Zend\Form\Element\Select('test');
$select->setValueOptions(
[
['attributes'=>['data-key'=>'value'],'value'=>'myValue','label'=>'myLabel']
]

);

echo $this->formselect($select);
```
the element view helper returns HTML:
```
myLabel

```
Being able to add these attributes to options is extremely useful for passing additional values for front-end processing, like adding a boolean value for an objects status,etc.

The attributes would be defined as :
```
$os->setOptions([
'object_manager' => $odm,
'target_class' => 'BsImmoManager\Domain\Aggregate\Advertiser',
'property' => 'name',
'option_attributes' => [
[ 'data-type'=>'getType']
],
'find_method' => [
'name' => 'findAll',
'params' => []
]
]);
```
Whereby the key option_attributes accepts an array of key/values, the keys are already filtered in ZF2 but typically include data-, aria-,onEvent, etc. The value is a method which will be called on the object which is cast to a string and used for the option attribute value.

```
data-key="value"
```