1 | <?php |
||
9 | class UserRoleAction |
||
10 | { |
||
11 | |||
12 | /** @Id @Column(type="integer") @GeneratedValue */ |
||
13 | protected $id; |
||
14 | |||
15 | /** @Column(type="string", nullable=false, unique=true, length=32) */ |
||
16 | protected $name; |
||
17 | |||
18 | /** |
||
19 | * Many Users have Many Stores. |
||
20 | * @ManyToMany(targetEntity="UserRole", inversedBy="user_roles", fetch="EAGER", cascade={"persist"}) |
||
21 | */ |
||
22 | protected $userRoles; |
||
23 | |||
24 | /** |
||
25 | * UserRoleAction constructor. |
||
26 | */ |
||
27 | public function __construct() |
||
31 | |||
32 | /** |
||
33 | * @return mixed |
||
34 | */ |
||
35 | public function getId() |
||
39 | |||
40 | /** |
||
41 | * @return mixed |
||
42 | */ |
||
43 | public function getActionName() |
||
47 | |||
48 | /** |
||
49 | * @param $name |
||
50 | */ |
||
51 | public function setActionName($name): void |
||
55 | |||
56 | /** |
||
57 | * @return mixed |
||
58 | */ |
||
59 | public function getUserRoles() |
||
63 | |||
64 | /** |
||
65 | * @param mixed $userRoles |
||
66 | */ |
||
67 | public function setUserRoles($userRoles): void |
||
71 | |||
72 | public function addUserRole(UserRole $role) |
||
84 | |||
85 | public function removeUserRole(UserRole $role) |
||
92 | } |
||
93 |