src/Entity/WebPageTemplate.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\WebPageTemplateRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=WebPageTemplateRepository::class)
  9.  */
  10. class WebPageTemplate
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.      /**
  19.      * @ORM\Column(type="string", length=255, unique=true)
  20.      */
  21.     private $name;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $gabaritName;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $specificCssPath;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $specificJsPath;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $thumbnail;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $preview;
  42.     /**
  43.      * @ORM\OneToMany(targetEntity=WebPage::class, mappedBy="template")
  44.      */
  45.     private $webPages;
  46.     public function __construct()
  47.     {
  48.         $this->webPages = new ArrayCollection();
  49.     }
  50.     public function getId(): ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getName(): ?string
  55.     {
  56.         return $this->name;
  57.     }
  58.     public function setName(string $name): self
  59.     {
  60.         $this->name $name;
  61.         return $this;
  62.     }
  63.     public function getGabaritName(): ?string
  64.     {
  65.         return $this->gabaritName;
  66.     }
  67.     public function setGabaritName(?string $gabaritName): self
  68.     {
  69.         $this->gabaritName $gabaritName;
  70.         return $this;
  71.     }
  72.     public function getSpecificCssPath(): ?string
  73.     {
  74.         return $this->specificCssPath;
  75.     }
  76.     public function setSpecificCssPath(?string $specificCssPath): self
  77.     {
  78.         $this->specificCssPath $specificCssPath;
  79.         return $this;
  80.     }
  81.     public function getSpecificJsPath(): ?string
  82.     {
  83.         return $this->specificJsPath;
  84.     }
  85.     public function setSpecificJsPath(?string $specificJsPath): self
  86.     {
  87.         $this->specificJsPath $specificJsPath;
  88.         return $this;
  89.     }
  90.     public function getThumbnail(): ?string
  91.     {
  92.         return $this->thumbnail;
  93.     }
  94.     public function setThumbnail(?string $thumbnail): self
  95.     {
  96.         $this->thumbnail $thumbnail;
  97.         return $this;
  98.     }
  99.     public function getPreview(): ?string
  100.     {
  101.         return $this->preview;
  102.     }
  103.     public function setPreview(?string $preview): self
  104.     {
  105.         $this->preview $preview;
  106.         return $this;
  107.     }
  108.     /**
  109.      * @return Collection|WebPage[]
  110.      */
  111.     public function getWebPages(): Collection
  112.     {
  113.         return $this->webPages;
  114.     }
  115.     public function addWebPage(WebPage $webPage): self
  116.     {
  117.         if (!$this->webPages->contains($webPage)) {
  118.             $this->webPages[] = $webPage;
  119.             $webPage->setListTemplate($this);
  120.         }
  121.         return $this;
  122.     }
  123.     public function removeWebPage(WebPage $webPage): self
  124.     {
  125.         if ($this->webPages->removeElement($webPage)) {
  126.             // set the owning side to null (unless already changed)
  127.             if ($webPage->getListTemplate() === $this) {
  128.                 $webPage->setListTemplate(null);
  129.             }
  130.         }
  131.         return $this;
  132.     }
  133. }