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 GalleryH
From the documentation:
"Note
The command will generate domain objects in an Application namespace. So you can point entities’ associations to a global and common namespace. This will make Entities sharing very easier as your models will allow to point to a global namespace. For instance the media will be Application\Sonata\MediaBundle\Entity\Media." http://sonata-project.org/bundles/media/2-2/doc/reference/installation.html
Pretty much what you get whenever you use the easy-extands bundle.
You use them just like any entity, just from a different namespace to your exisitng Entities.
As to using them in another form type, just embed the media form type in your user form type: http://sonata-project.org/bundles/media/2-2/doc/reference/form.html
To add the fields to another entity you just add the property with getters and setters and (we always use doctrine annotations not yaml) add the annotation for the media entity as the target entity with the column name for the type of relationship (1:1,1:M,M:M, etc) in the usual symfony way.