Total Complexity | 4 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
23 | class AccessUrlRelUser |
||
24 | { |
||
25 | use UserTrait; |
||
26 | |||
27 | /** |
||
28 | * @var int |
||
29 | * |
||
30 | * @ORM\Id |
||
31 | * @ORM\GeneratedValue |
||
32 | * @ORM\Column(name="id", type="integer") |
||
33 | */ |
||
34 | protected $id; |
||
35 | |||
36 | /** |
||
37 | * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User", inversedBy="portals") |
||
38 | * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE") |
||
39 | */ |
||
40 | protected $user; |
||
41 | |||
42 | /** |
||
43 | * @ORM\ManyToOne(targetEntity="AccessUrl", inversedBy="user", cascade={"persist"}) |
||
44 | * @ORM\JoinColumn(name="access_url_id", referencedColumnName="id") |
||
45 | */ |
||
46 | protected $url; |
||
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | public function __toString() |
||
52 | { |
||
53 | return (string) $this->id; |
||
54 | } |
||
55 | |||
56 | public function getId(): int |
||
59 | } |
||
60 | |||
61 | public function getUrl(): AccessUrl |
||
62 | { |
||
63 | return $this->url; |
||
64 | } |
||
65 | |||
66 | public function setUrl(AccessUrl $url): self |
||
71 | } |
||
72 | } |
||
73 |