FAQ Database Discussion Community


SonataMediaBundle - Neither property nor methods exist

symfony2,sonata-user-bundle,sonata-media-bundle
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;...

Symfony2, Sonata MediaBundle : add new fields to table

php,symfony2,doctrine2,sonata,sonata-media-bundle
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...

Symfony Sonata Media Bundle add images/videos to a user

php,symfony2,sonata,sonata-media-bundle
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...