FAQ Database Discussion Community

SonataMediaBundle - Neither property nor methods exist

I've installed Sonata Admin, Media, Classification, and few others without any problem. I have an entity called task and I need to be able to attach some files to my tasks.So my Task entity looks like this: class Task { //... /** * @ORM\OneToOne(targetEntity="Application\Sonata\MediaBundle\Entity\Media") * @ORM\JoinColumn(name="attachment_id", referencedColumnName="id") **/ protected $attachment;...

Symfony Sonata Media Bundle add images/videos to a user

I am trying to integrate Sonata Media Bundle in my project. The problem is, that i don't understand how the bundle works. It has generated a Media, Gallery and GalleryHasMedia class within 'Application'. What are they for? How can I now add an images field and a videos field to...

Symfony2, Sonata MediaBundle : add new fields to table

I'm trying to add 4 new fields in Sonata MediaBundle for the GalleryHasMedia. I correctly override the GalleryHasMediaAdmin : To override it i added in services.yml this line : parameters: sonata.media.admin.gallery_has_media.class: Application\Sonata\MediaBundle\Admin\GalleryHasMediaAdmin I had to create the methods manually (getName and else) since php app/console doctrine:generate:entities ApplicationSonataMediaBundle:GalleryHasMedia apparently not caring...