From 61d3aa62b034e0beb33393777055bc7c60a1a1e5 Mon Sep 17 00:00:00 2001 From: Richard Miller Date: Wed, 28 Nov 2012 22:16:40 +0000 Subject: [PATCH 1/2] Updating way of getting entity manager to use base controller helper methods --- cookbook/security/acl.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/security/acl.rst b/cookbook/security/acl.rst index 39d167b8a87..88d21bfb0f4 100644 --- a/cookbook/security/acl.rst +++ b/cookbook/security/acl.rst @@ -105,7 +105,7 @@ Creating an ACL, and adding an ACE // ... setup $form, and bind data if ($form->isValid()) { - $entityManager = $this->get('doctrine.orm.default_entity_manager'); + $entityManager = $this->getDoctrine()->getManager(); $entityManager->persist($comment); $entityManager->flush(); From 80d41762326edfbbf0a884a3c316f3a4eb3a79fd Mon Sep 17 00:00:00 2001 From: Richard Miller Date: Wed, 28 Nov 2012 22:43:35 +0000 Subject: [PATCH 2/2] Correcting method name to 2.0 version --- cookbook/security/acl.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/security/acl.rst b/cookbook/security/acl.rst index 88d21bfb0f4..d83ed37319a 100644 --- a/cookbook/security/acl.rst +++ b/cookbook/security/acl.rst @@ -105,7 +105,7 @@ Creating an ACL, and adding an ACE // ... setup $form, and bind data if ($form->isValid()) { - $entityManager = $this->getDoctrine()->getManager(); + $entityManager = $this->getDoctrine()->getEntityManager(); $entityManager->persist($comment); $entityManager->flush();