sentNotifications = new ArrayCollection(); $this->customRoles = new ArrayCollection(); $this->receivedNotifications = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): static { $this->email = $email; return $this; } /** * A visual identifier that represents this user. * * @see UserInterface */ public function getUserIdentifier(): string { return (string) $this->email; } /** * @see UserInterface */ public function getRoles(): array { $roles = $this->roles; // guarantee every user at least has ROLE_USER $roles[] = 'ROLE_USER'; return array_unique($roles); } public function setRoles(array $roles): static { $this->roles = $roles; return $this; } /** * @see PasswordAuthenticatedUserInterface */ public function getPassword(): string { return $this->password; } public function setPassword(string $password): static { $this->password = $password; return $this; } /** * @see UserInterface */ public function eraseCredentials(): void { // If you store any temporary, sensitive data on the user, clear it here // $this->plainPassword = null; } public function getFirstName(): ?string { return $this->firstName; } public function setFirstName(?string $firstName): static { $this->firstName = $firstName; return $this; } public function getLastName(): ?string { return $this->lastName; } public function setLastName(?string $lastName): static { $this->lastName = $lastName; return $this; } public function getPhone(): ?string { return $this->phone; } public function setPhone(?string $phone): static { $this->phone = $phone; return $this; } public function getProfilePicture(): ?string { return $this->profilePicture; } public function setProfilePicture(?string $profilePicture): static { $this->profilePicture = $profilePicture; return $this; } public function getBirthday(): ?\DateTimeInterface { return $this->birthday; } public function setBirthday(?\DateTimeInterface $birthday): static { $this->birthday = $birthday; return $this; } public function isActive(): ?bool { return $this->active; } public function setActive(?bool $active): static { $this->active = $active; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } #[ORM\PrePersist] public function setCreatedAt(): void { $timezone = new \DateTimeZone('Europe/Madrid'); $this->createdAt = new \DateTimeImmutable('now', $timezone); } public function getNoteList(): ?array { return $this->noteList; } public function setNoteList(?array $noteList): static { $this->noteList = $noteList; return $this; } public function getTeam(): ?Team { return $this->team; } public function setTeam(?Team $team): static { // unset the owning side of the relation if necessary if ($team === null && $this->team !== null) { $this->team->setCaptain(null); } // set the owning side of the relation if necessary if ($team !== null && $team->getCaptain() !== $this) { $team->setCaptain($this); } $this->team = $team; return $this; } /** * @return Collection */ public function getSentNotifications(): Collection { return $this->sentNotifications; } public function addSentNotifications(Notification $sentNotifications): static { if (!$this->sentNotifications->contains($sentNotifications)) { $this->sentNotifications->add($sentNotifications); $sentNotifications->setUserWhoFiredEvent($this); } return $this; } public function removeSentNotifications(Notification $sentNotifications): static { if ($this->sentNotifications->removeElement($sentNotifications)) { // set the owning side to null (unless already changed) if ($sentNotifications->getUserWhoFiredEvent() === $this) { $sentNotifications->setUserWhoFiredEvent(null); } } return $this; } /** * @return Collection */ public function getCustomRoles(): Collection { return $this->customRoles; } public function addCustomRole(CustomRole $customRole): static { if (!$this->customRoles->contains($customRole)) { $this->customRoles->add($customRole); $customRole->setUser($this); } return $this; } public function removeCustomRole(CustomRole $customRole): static { if ($this->customRoles->removeElement($customRole)) { // set the owning side to null (unless already changed) if ($customRole->getUser() === $this) { $customRole->setUser(null); } } return $this; } /** * @return Collection */ public function getReceivedNotifications(): Collection { return $this->receivedNotifications; } public function addReceivedNotification(Notification $receivedNotification): static { if (!$this->receivedNotifications->contains($receivedNotification)) { $this->receivedNotifications->add($receivedNotification); $receivedNotification->setUserToNotify($this); } return $this; } public function removeReceivedNotification(Notification $receivedNotification): static { if ($this->receivedNotifications->removeElement($receivedNotification)) { // set the owning side to null (unless already changed) if ($receivedNotification->getUserToNotify() === $this) { $receivedNotification->setUserToNotify(null); } } return $this; } public function isPrivacyPolicy(): ?bool { return $this->privacyPolicy; } public function setPrivacyPolicy(?bool $privacyPolicy): static { $this->privacyPolicy = $privacyPolicy; return $this; } }