aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-07 22:32:21 +0100
committerJeremy <jeremy.benoist@gmail.com>2015-02-08 23:13:40 +0100
commit7812f508bcb68d9d0e1868fa568d7a435e7975b7 (patch)
tree230789b35511f3f03efe340c7f616bd60dc729ae /src/Wallabag
parent5f09650eef7bea52b7c54c074c0f873f96e53c86 (diff)
downloadwallabag-7812f508bcb68d9d0e1868fa568d7a435e7975b7.tar.gz
wallabag-7812f508bcb68d9d0e1868fa568d7a435e7975b7.tar.zst
wallabag-7812f508bcb68d9d0e1868fa568d7a435e7975b7.zip
create an Entry with a User in parameter
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php5
1 files changed, 3 insertions, 2 deletions
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
19 */ 19 */
20 public function addEntryAction(Request $request) 20 public function addEntryAction(Request $request)
21 { 21 {
22 $entry = new Entry(); 22 $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:User');
23 $entry->setUserId(1); 23 $user = $repository->find(1);
24 $entry = new Entry($user);
24 25
25 $form = $this->createFormBuilder($entry) 26 $form = $this->createFormBuilder($entry)
26 ->add('url', 'url') 27 ->add('url', 'url')