<?php
namespace App\Entity;
use App\Repository\WebPageTemplateRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=WebPageTemplateRepository::class)
*/
class WebPageTemplate
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, unique=true)
*/
private $name;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $gabaritName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $specificCssPath;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $specificJsPath;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $thumbnail;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $preview;
/**
* @ORM\OneToMany(targetEntity=WebPage::class, mappedBy="template")
*/
private $webPages;
public function __construct()
{
$this->webPages = 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;
}
public function getGabaritName(): ?string
{
return $this->gabaritName;
}
public function setGabaritName(?string $gabaritName): self
{
$this->gabaritName = $gabaritName;
return $this;
}
public function getSpecificCssPath(): ?string
{
return $this->specificCssPath;
}
public function setSpecificCssPath(?string $specificCssPath): self
{
$this->specificCssPath = $specificCssPath;
return $this;
}
public function getSpecificJsPath(): ?string
{
return $this->specificJsPath;
}
public function setSpecificJsPath(?string $specificJsPath): self
{
$this->specificJsPath = $specificJsPath;
return $this;
}
public function getThumbnail(): ?string
{
return $this->thumbnail;
}
public function setThumbnail(?string $thumbnail): self
{
$this->thumbnail = $thumbnail;
return $this;
}
public function getPreview(): ?string
{
return $this->preview;
}
public function setPreview(?string $preview): self
{
$this->preview = $preview;
return $this;
}
/**
* @return Collection|WebPage[]
*/
public function getWebPages(): Collection
{
return $this->webPages;
}
public function addWebPage(WebPage $webPage): self
{
if (!$this->webPages->contains($webPage)) {
$this->webPages[] = $webPage;
$webPage->setListTemplate($this);
}
return $this;
}
public function removeWebPage(WebPage $webPage): self
{
if ($this->webPages->removeElement($webPage)) {
// set the owning side to null (unless already changed)
if ($webPage->getListTemplate() === $this) {
$webPage->setListTemplate(null);
}
}
return $this;
}
}