*/ #[ORM\ManyToMany(targetEntity: Intern::class, mappedBy: 'favorites')] private Collection $internsfav; /** * @var Collection */ #[ORM\ManyToMany(targetEntity: Intern::class, mappedBy: 'applications')] private Collection $applicants; public function __construct() { $this->internsfav = new ArrayCollection(); $this->applicants = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): static { $this->title = $title; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(string $description): static { $this->description = $description; return $this; } public function getCompany(): ?Company { return $this->company; } public function setCompany(?Company $company): static { $this->company = $company; return $this; } public function getStatus(): ?Status { return $this->status; } public function setStatus(?Status $status): static { $this->status = $status; return $this; } /** * @return Collection */ public function getInternsfav(): Collection { return $this->internsfav; } public function addInternfav(Intern $intern): static { if (!$this->internsfav->contains($intern)) { $this->internsfav->add($intern); $intern->addFavorite($this); } return $this; } public function removeInternfav(Intern $intern): static { if ($this->internsfav->removeElement($intern)) { $intern->removeFavorite($this); } return $this; } /** * @return Collection */ public function getApplicants(): Collection { return $this->applicants; } public function addApplicant(Intern $applicant): static { if (!$this->applicants->contains($applicant)) { $this->applicants->add($applicant); $applicant->addApplication($this); } return $this; } public function removeApplicant(Intern $applicant): static { if ($this->applicants->removeElement($applicant)) { $applicant->removeApplication($this); } return $this; } }