21 mars 2013

Create an entity repository as a Symfony service

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