title: Custom collection templates in symfony2
body: <p>Is it posible to add custom global templates for items in collection form fields?</p>
  
  <p>I don't want to customize the collection template itself, but the rendering of each object in the collection, for example for adding a specific class or markup to each object contained in the collection.</p>
  
  <p>I have a form with a collection field added like this:</p>
  
  <pre><code>$builder
      -&gt;add('items', 'collection', array(
          'type' =&gt; new ItemType(),
          'allow_add' =&gt; true,
          'allow_delete' =&gt; true,
          'prototype' =&gt; true
      ));
  </code></pre>
  
  <p>I want to define a twig template to add a "delete" button to each item in the collection (among other things).</p>
  
  <p>I have found there is a 'collection_widget' template to customize collections, buy this is only for the collection itself, not individual items.</p>
  
  <p>NOTE 1: I need to use a global template in order to do this for all collections in all forms, I know I can solve this for each form template, but that's not the point.</p>
  
  <p>NOTE 2: So far I solved this with jquery, adding a class to collection_widget and adding buttons for all it's children with jquery. This works fine for now, but I'm looking for a  100% template solution, without having to do all the jquery handling. Ideally this should also work with the row prototype for adding new items.</p>