1 | <?php |
||
16 | class UserProfile |
||
17 | { |
||
18 | /** |
||
19 | * @ORM\Id() |
||
20 | * @ORM\GeneratedValue() |
||
21 | * @ORM\Column(type="integer") |
||
22 | */ |
||
23 | private $id; |
||
24 | |||
25 | /** |
||
26 | * @var $user User |
||
27 | * @ORM\OneToOne(targetEntity="App\Users\Entity\User", inversedBy="profile") |
||
28 | * @ORM\JoinColumn(nullable=false) |
||
29 | */ |
||
30 | private $user; |
||
31 | |||
32 | /** |
||
33 | * @var $contacts UserProfileContacts[]|ArrayCollection |
||
34 | * @ORM\OneToMany(targetEntity="App\Users\Entity\UserProfileContacts", mappedBy="profile", cascade={"persist", "remove"}) |
||
35 | * @ORM\JoinColumn(nullable=true) |
||
36 | * @Expose |
||
37 | */ |
||
38 | private $contacts; |
||
39 | |||
40 | /** |
||
41 | * @ORM\Column(type="string", length=255, nullable=true) |
||
42 | * @Expose |
||
43 | */ |
||
44 | private $first_name; |
||
45 | |||
46 | /** |
||
47 | * @ORM\Column(type="string", length=255, nullable=true) |
||
48 | * @Expose |
||
49 | */ |
||
50 | private $last_name; |
||
51 | |||
52 | /** |
||
53 | * @ORM\Column(type="date", nullable=true) |
||
54 | * @Expose |
||
55 | */ |
||
56 | private $birth_date; |
||
57 | |||
58 | /** |
||
59 | * @ORM\Column(type="string", length=255, nullable=true) |
||
60 | * @Expose |
||
61 | */ |
||
62 | private $about; |
||
63 | |||
64 | /** |
||
65 | * @ORM\Column(type="string", length=255, nullable=true) |
||
66 | * @Expose |
||
67 | */ |
||
68 | 31 | private $public_email; |
|
69 | |||
70 | 31 | public function __construct(User $user) |
|
75 | |||
76 | /** |
||
77 | 1 | * @return mixed |
|
78 | */ |
||
79 | 1 | public function getFirstName() |
|
83 | |||
84 | /** |
||
85 | 1 | * @param mixed $first_name |
|
86 | * @return UserProfile |
||
87 | 1 | */ |
|
88 | public function setFirstName($first_name) |
||
93 | 2 | ||
94 | /** |
||
95 | 2 | * @return mixed |
|
96 | */ |
||
97 | public function getLastName() |
||
101 | |||
102 | 1 | /** |
|
103 | * @param mixed $last_name |
||
104 | 1 | * @return UserProfile |
|
105 | 1 | */ |
|
106 | public function setLastName($last_name) |
||
111 | 2 | ||
112 | /** |
||
113 | 2 | * @return mixed |
|
114 | */ |
||
115 | public function getAbout() |
||
119 | |||
120 | /** |
||
121 | 1 | * @param mixed $about |
|
122 | * @return UserProfile |
||
123 | 1 | */ |
|
124 | 1 | public function setAbout($about) |
|
129 | 1 | ||
130 | /** |
||
131 | * @return mixed |
||
132 | */ |
||
133 | public function getPublicEmail() |
||
137 | |||
138 | /** |
||
139 | * @param mixed $public_email |
||
140 | * @return UserProfile |
||
141 | */ |
||
142 | public function setPublicEmail($public_email) |
||
147 | |||
148 | /** |
||
149 | * @return mixed |
||
150 | */ |
||
151 | public function getId() |
||
155 | |||
156 | /** |
||
157 | * @return User |
||
158 | */ |
||
159 | public function getUser(): User |
||
163 | |||
164 | /** |
||
165 | * @return mixed |
||
166 | */ |
||
167 | public function getBirthDate() |
||
171 | |||
172 | /** |
||
173 | * @param \DateTime $birth_date |
||
174 | * @return UserProfile |
||
175 | */ |
||
176 | public function setBirthDate(\DateTime $birth_date) |
||
181 | |||
182 | /** |
||
183 | * @return UserProfileContacts[]|ArrayCollection |
||
184 | */ |
||
185 | public function getContacts() |
||
189 | |||
190 | /** |
||
191 | * @param $name |
||
192 | * @param $url |
||
193 | * @return $this |
||
194 | */ |
||
195 | public function addContacts($name, $url) |
||
201 | } |