*/ #[ORM\OneToMany(mappedBy: 'pxeBootFile', targetEntity: Client::class)] private Collection $clients; public function __construct() { parent::__construct(); $this->clients = new ArrayCollection(); } public function getTemplate(): ?PxeTemplate { return $this->template; } public function setTemplate(?PxeTemplate $template): static { $this->template = $template; 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->setPxeBootFile($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->getPxeBootFile() === $this) { $client->setPxeBootFile(null); } } return $this; } public function setClients(array $clients): static { $this->clients->clear(); foreach ($clients as $client){ $this->addClient($client); } return $this; } }