I'm using ZF2, Doctrine and Doctrine Hydrator. I've the following tables
I've a "Tours" Class and "TourTypes" Class and the TourFormFieldset with the following field:
$this->add( array(
'type' => 'DoctrineModule\Form\Element\ObjectMultiCheckbox',
'name' => 'tourtype',
'options' => array(
'object_manager' => $this->getObjectManager(),
'target_class' => 'Tours\Entity\TourType',
'property' => 'title',
'label' => 'Tour Type'
)
)
);
I can display a list of tourtypes checkbox in the tour editing view, but i don't know how to store a retrieve a collection of tour types selected.