title: Doctrine ObjectMultiCheckBox form many-to-many grouped
body: <p>I have a database like this</p>
  
  <p><img src="https://i.stack.imgur.com/P6GLy.png" alt="model database"></p>
  
  <p>And I need to make a form with checkboxes to save this to this database. Assume these are what my records look like</p>
  
  <p><img src="https://i.stack.imgur.com/GU2w2.png" alt="db records"></p>
  
  <p>For now, I have a form like this in which the user can't know witch action corresponds to which function</p>
  
  <p><img src="https://i.stack.imgur.com/KQM7G.png" alt="actual form"></p>
  
  <p>I'd like something like this where action and function appear together</p>
  
  <p><img src="https://i.stack.imgur.com/4g2l9.png" alt="enter image description here"></p>
  
  <p>Does anyone know how to do this?</p>
  
  <p>My PHP code for creating the checkboxes is as follows:</p>
  
  <pre><code>        $this-&gt;add(array(
          'type' =&gt; 'DoctrineModule\Form\Element\ObjectMultiCheckbox',
          'name' =&gt; 'functionAction',
          'options' =&gt; array(
              'label' =&gt; 'Functions:',
              'object_manager' =&gt; $this-&gt;getObjectManager(),
              'target_class' =&gt; 'Acl\Entity\FunctionAction',
              'label_generator' =&gt; function ($funcAction)
              {
                  return $funcAction-&gt;getAction()-&gt;getDescription();
              },
              'is_method' =&gt; true,
              'find_method' =&gt; array(
                  'name' =&gt; 'findByRole',
                  'params' =&gt; array(
                      'role' =&gt; $this-&gt;getUser()-&gt;getRole()
                  )
              )
          )
      ));
  </code></pre>