assignments = new ArrayCollection(); $this->representations = new ArrayCollection(); $this->employeeSkills = new ArrayCollection(); } public function getEmployeeSkills(): Collection { return $this->employeeSkills; } public function addEmployeeSkill(EmployeeSkill $employeeSkill): static { if(!$this->employeeSkills->contains($employeeSkill)) { $this->employeeSkills->add($employeeSkill); $employeeSkill->setEmployee($this); } return $this; } public function removeEmployeeSkill(EmployeeSkill $employeeSkill): static { if($this->employeeSkills->removeElement($employeeSkill)) { if($employeeSkill->getEmployee() === $this) { $employeeSkill->setEmployee(null); } } return $this; } // public function getEmployeeMissions(): Collection // { // return $this->employeeMissions; // } // // public function setEmployeeMissions(Collection $employeeMissions): void // { // $this->employeeMissions = $employeeMissions; // } // public function getEmployeeIncidents(): Collection // { // return $this->employeeIncidents; // } // // public function setEmployeeIncidents(Collection $employeeIncidents): void // { // $this->employeeIncidents = $employeeIncidents; // } public function getAssignments(): Collection { return $this->assignments; } public function addAssigment(Assignment $assignment): static { if(!$this->assignments->contains($assignment)) { $this->assignments->add($assignment); $assignment->setEmployee($this); } return $this; } public function removeAssigment(Assignment $assignment): static { if($this->assignments->removeElement($assignment)) { if($assignment->getEmployee() === $this) { $assignment->setEmployee(null); } } return $this; } public function getRepresentations(): Collection { return $this->representations; } public function addRepresentation(Representation $representation): static { if(!$this->representations->contains($representation)) { $this->representations->add($representation); $representation->setEmployee($this); } return $this; } public function removeRepresentation(Representation $representation): static { if($this->representations->removeElement($representation)) { if($representation->getEmployee() === $this) { $representation->setEmployee(null); } } return $this; } public function getId(): ?int { return $this->id; } public function setId(int $id): static { $this->id = $id; return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): static { $this->email = $email; return $this; } 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 getPassword(): ?string { return $this->password; } public function setPassword(string $password): static { $this->password = $password; return $this; } public function eraseCredentials(): void { // If you store any temporary, sensitive data on the user, clear it here // $this->plainPassword = null; } public function getUserIdentifier(): string { return (string) $this->email; } public function getRoles(): array { $roles = $this->roles; // guarantee every user at least has ROLE_USER $roles[] = 'ROLE_USER'; return array_unique($roles); } /** * @param list $roles */ public function setRoles(array $roles): static { $this->roles = $roles; return $this; } public function getMissions(): ?Collection { return $this->missions; } public function setMissions(Collection $missions): void { $this->missions = $missions; } public function getIncidents(): ?Collection { return $this->incidents; } public function setIncidents(Collection $incidents): void { $this->incidents = $incidents; } public function __toString(): string { return $this->firstName . ' ' . $this->lastName; } }