<?phpnamespace App\Entity\Gos\Tmpl;use App\Entity\Gos\MetaTags;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass="App\Repository\TemplateTypeRepository") */class TemplateType{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\OneToMany(targetEntity="App\Entity\Gos\Tmpl\Template", mappedBy="templateType") */ private $templates; /** * @ORM\OneToOne(targetEntity="App\Entity\Gos\MetaTags", mappedBy="templateType") */ private $metaTags; /** * @var boolean * @ORM\Column(type="boolean", nullable=false, options={"default": 1}) */ private $isDefault = 1; /** * @ORM\Column(type="boolean", nullable=false, options={"default": 1}) */ private $enabledToLink = 1; public function __construct() { $this->templates = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } /** * @return Collection|Template[] */ public function getTemplates(): Collection { return $this->templates; } public function addTemplate(Template $template): self { if (!$this->templates->contains($template)) { $this->templates[] = $template; $template->setTemplateType($this); } return $this; } public function removeTemplate(Template $template): self { if ($this->templates->contains($template)) { $this->templates->removeElement($template); // set the owning side to null (unless already changed) if ($template->getTemplateType() === $this) { $template->setTemplateType(null); } } return $this; } public function getIsDefault(): ?bool { return $this->isDefault; } public function setIsDefault(bool $isDefault): self { $this->isDefault = $isDefault; return $this; } public function getEnabledToLink(): ?bool { return $this->enabledToLink; } public function setEnabledToLink(bool $enabledToLink): self { $this->enabledToLink = $enabledToLink; return $this; } public function getMetaTags(): ?MetaTags { return $this->metaTags; } public function setMetaTags(?MetaTags $metaTags): self { $this->metaTags = $metaTags; // set (or unset) the owning side of the relation if necessary $newTemplateType = $metaTags === null ? null : $this; if ($newTemplateType !== $metaTags->getTemplateType()) { $metaTags->setTemplateType($newTemplateType); } return $this; }}