In Symfony2, how can I go about adding Doctrine's entity manager to a custom class or service?
I have tried $em = $this->get("doctrine.orm.entity_manager");
and $em = $this->getDoctrine()->getEntityManager();
Both failed, which led me to try and extend the Controller class with my custom class/service, and that died in a giant ball of fire.