In the bundle MyVendor\MyBundle, to instantiate the entity repository MyRepository for the entity MyEntity, you can use the following service definition.
MyVendor\MyBundle\Entity\MyClass
Source: http://blog.code4hire.com/2011/08/custom-repository-with-dic-in-symfony2/
Aucun commentaire:
Enregistrer un commentaire