mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-23 17:41:01 +00:00
create an Entry with a User in parameter
This commit is contained in:
parent
5f09650eef
commit
7812f508bc
1 changed files with 3 additions and 2 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue