I try to make a web site with Symfony. So I installed SonataAdminBundle and SonataMediaBundle.
And I have a question about Sonata media. I created a gallery with a lots of image media in it and I don't know how I can access it from my Controller.
How can I get my media (image) contained in my gallery for show them in my template?
thx for help !
EDIT: I solved my problem !
So in my template I do:
{% for img in MyEntity.gallery.galleryHasMedias %}
<img src={% path img.media, 'reference'%}>
{% endfor %}