File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public function indexAction(Request $request)
22
22
$ form ->handleRequest ($ request );
23
23
if ($ form ->isValid ()) {
24
24
$ menu = $ form ->getData ();
25
- $ menu ->setUserId ($ this ->getUser ()-> getId ());
25
+ $ menu ->setUser ($ this ->getUser ());
26
26
$ em ->persist ($ menu );
27
27
$ em ->flush ();
28
28
@@ -161,7 +161,7 @@ public function menuAction(Request $request, $menu_id)
161
161
if ($ form ->isValid ()) {
162
162
/** @var Item $item */
163
163
$ item = $ form ->getData ();
164
- $ item ->setUserId ($ this ->getUser ()-> getId ());
164
+ $ item ->setUser ($ this ->getUser ());
165
165
$ item ->setMenu ($ menu );
166
166
167
167
$ em ->persist ($ item );
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class Item
21
21
use ColumnTrait \Description;
22
22
use ColumnTrait \Position;
23
23
use ColumnTrait \Title;
24
- use ColumnTrait \UserId ;
24
+ use ColumnTrait \FosUser ;
25
25
26
26
/**
27
27
* @var Item
@@ -96,7 +96,6 @@ public function __construct()
96
96
$ this ->title = null ;
97
97
$ this ->url = null ;
98
98
$ this ->updated_at = null ;
99
- $ this ->user_id = 1 ;
100
99
}
101
100
102
101
/**
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class Menu
17
17
use ColumnTrait \CreatedAt;
18
18
use ColumnTrait \Description;
19
19
use ColumnTrait \Position;
20
- use ColumnTrait \UserId ;
20
+ use ColumnTrait \FosUser ;
21
21
22
22
/**
23
23
* @var Item[]|ArrayCollection
@@ -50,7 +50,6 @@ public function __construct()
50
50
$ this ->position = 0 ;
51
51
$ this ->description = null ;
52
52
$ this ->items = new ArrayCollection ();
53
- $ this ->user_id = 1 ;
54
53
}
55
54
56
55
/**
You can’t perform that action at this time.
0 commit comments