mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-27 11:31:05 +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)
|
public function addEntryAction(Request $request)
|
||||||
{
|
{
|
||||||
$entry = new Entry();
|
$repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:User');
|
||||||
$entry->setUserId(1);
|
$user = $repository->find(1);
|
||||||
|
$entry = new Entry($user);
|
||||||
|
|
||||||
$form = $this->createFormBuilder($entry)
|
$form = $this->createFormBuilder($entry)
|
||||||
->add('url', 'url')
|
->add('url', 'url')
|
||||||
|
|
Loading…
Reference in a new issue