Skip to content

Instantly share code, notes, and snippets.

@CharlyPoppins
Created April 11, 2015 11:32
Show Gist options
  • Save CharlyPoppins/9f2a76aabdbb0652377e to your computer and use it in GitHub Desktop.
Save CharlyPoppins/9f2a76aabdbb0652377e to your computer and use it in GitHub Desktop.
plurialization
produit:
categorie:
categorie: catégorie|catégories
->add('categories', 'entity', array(
'label' => 'clicissimmo.produit.categorie.categorie',
'class' => 'Charly\CharlyBundle\Entity\Categorie',
'choices' => $em->getRepository('CharlyCharlyBundle:Categorie')->getTreeviewFlat(),
'property' => 'getMyLabel',
'required' => false,
'multiple' => true,
'expanded' => true
)
)
<div class="form-group">
{{ form_label(formProduits.categories) }}
<div class="col-md-4">
{{ form_widget(formProduits.categories) }}
</div>
{{ form_errors(formProduits.categories) }}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment