From 7812f508bcb68d9d0e1868fa568d7a435e7975b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 7 Feb 2015 22:32:21 +0100 Subject: create an Entry with a User in parameter --- src/Wallabag/CoreBundle/Controller/EntryController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/CoreBundle') diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 6326d31f..2dfe2f51 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -19,8 +19,9 @@ class EntryController extends Controller */ public function addEntryAction(Request $request) { - $entry = new Entry(); - $entry->setUserId(1); + $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:User'); + $user = $repository->find(1); + $entry = new Entry($user); $form = $this->createFormBuilder($entry) ->add('url', 'url') -- cgit v1.2.3