Ceci est une ancienne révision du document !
Opérations CRUD
Entity manager & Repository
Récupération de l'entity manager doctrine dans un contrôleur :
// you can fetch the EntityManager via $this->getDoctrine()
// or you can add an argument to your action: index(EntityManagerInterface $em)
$em = $this->getDoctrine()->getManager();
Comme indiqué, l'entity manager peut aussi être injecté.