Sonata Admin Bundle for Symfony 2, Many-To-Many Relation
I would like to use the Sonata Admin bundle to manage my Blog model.
I have a post entity with a Many-to-many relation to tags.
In my post admin class I defined the field for the tags like so:
->add('tags', 'sonata_type_model', array('expanded' => true, 'multiple' =>
true))
Now I can add a new tag which works fine but what i need is a selection of
the existing tags in the tags entity. How can i achieve this?
No comments:
Post a Comment