*/ #[ORM\OneToMany(mappedBy: 'template', targetEntity: Client::class)] private Collection $clients; #[ORM\Column(nullable: true)] private ?bool $isDefault = null; #[ORM\ManyToOne(inversedBy: 'templates')] #[ORM\JoinColumn(nullable: true)] private ?BootServer $bootServer = null; public function __construct() { parent::__construct(); $this->clients = new ArrayCollection(); } public function getTemplateContent(): ?string { return $this->templateContent; } public function setTemplateContent(string $templateContent): static { $this->templateContent = $templateContent; return $this; } /** * @return Collection */ public function getClients(): Collection { return $this->clients; } public function setClients(array $clients): static { $this->clients->clear(); foreach ($clients as $client){ $this->addClient($client); } return $this; } public function addClient(Client $client): static { if (!$this->clients->contains($client)) { $this->clients->add($client); } return $this; } public function removeClient(Client $client): static { if ($this->clients->removeElement($client)) { if ($client->getTemplate() === $this) { $client->setTemplate(null); } } return $this; } public function isDefault(): ?bool { return $this->isDefault; } public function setDefault(?bool $isDefault): static { $this->isDefault = $isDefault; return $this; } public function getBootServer(): ?BootServer { return $this->bootServer; } public function setBootServer(?BootServer $bootServer): static { $this->bootServer = $bootServer; return $this; } }