*/ #[ORM\ManyToMany(targetEntity: Hardware::class, inversedBy: 'hardwareProfiles')] private Collection $hardwareCollection; /** * @var Collection */ #[ORM\OneToMany(mappedBy: 'hardwareProfile', targetEntity: Client::class)] private Collection $clients; public function __construct() { parent::__construct(); $this->hardwareCollection = new ArrayCollection(); $this->clients = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): static { $this->description = $description; return $this; } public function getComments(): ?string { return $this->comments; } public function setComments(?string $comments): static { $this->comments = $comments; return $this; } public function getOrganizationalUnit(): ?OrganizationalUnit { return $this->organizationalUnit; } public function setOrganizationalUnit(?OrganizationalUnit $organizationalUnit): static { $this->organizationalUnit = $organizationalUnit; return $this; } /** * @return Collection */ public function getHardwareCollection(): Collection { return $this->hardwareCollection; } public function addHardwareCollection(Hardware $hardwareCollection): static { if (!$this->hardwareCollection->contains($hardwareCollection)) { $this->hardwareCollection->add($hardwareCollection); } return $this; } public function removeHardwareCollection(Hardware $hardwareCollection): static { $this->hardwareCollection->removeElement($hardwareCollection); return $this; } /** * @return Collection */ public function getClients(): Collection { return $this->clients; } public function addClient(Client $client): static { if (!$this->clients->contains($client)) { $this->clients->add($client); $client->setHardwareProfile($this); } return $this; } public function removeClient(Client $client): static { if ($this->clients->removeElement($client)) { // set the owning side to null (unless already changed) if ($client->getHardwareProfile() === $this) { $client->setHardwareProfile(null); } } return $this; } }