Zend Framework 2 Doctrine 2 one-to-many checkbox hydration

class RoleForm extends Form implements InputFilterProviderInterface { public function __construct(ObjectManager $objectManager) { // … $this->add(array( ‘name’ => ‘rolePermissions’, ‘type’ => ‘Zend\Form\Element\Collection’, ‘options’ => array( ‘label’ => ‘Role Permissions’, ‘count’ => 0, ‘should_create_template’ => true, ‘allow_add’ => true, ‘target_element’ => array( ‘type’ => ‘Zend\Form\Fieldset’, ‘options’ => array( ‘use_as_base_fieldset’ => true ), ‘elements’ => array( // add … Read more