I have the bundle which is called the Linked Bundle. Now I have put all the mix stuff in there which is used across all bundles.
But I don’t have any entity called Linked.
I want to create LinkedRepository so that i can have my all common function there. But how will i get that repository in other bundles. I mean how to call this
$repository = $em->getRepository('LinkedBundle:"*What should I write here*"');
You cannot have a separate repository class. A repository class is linked to an entity, so you cannot have a “standalone” repository but I can see two options:
@ORM\Entity(repositoryClass="Acme\LinkedBundle\Repository\LinkedRepository")assuming you have your Repository classes in the Repository folder inside your Bundle and replace Acme with your company name.I guess the first one is easier.