src/Entity/DiaporamaTemplate.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity (repositoryClass="App\Repository\DiaporamaTemplateRepository")
  8.  */
  9. class DiaporamaTemplate
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true)
  19.      */
  20.     private $key;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private $name;
  25.     /**
  26.      * @ORM\Column(type="string",length=1000, nullable=false)
  27.      */
  28.     private $thumbnail;
  29.     /**
  30.      * @ORM\Column(type="string",length=1000, nullable=true)
  31.      */
  32.     private $thumbnailInfos;
  33.     /**
  34.      * @ORM\Column(type="string",length=1000, nullable=false)
  35.      */
  36.     private $twigPath;
  37.     /**
  38.      * @ORM\OneToMany(targetEntity="App\Entity\Diaporama", mappedBy="diaporamaTemplate")
  39.      */
  40.     private $diaporamas;
  41.     /**
  42.      * @ORM\OneToMany(targetEntity="App\Entity\DiaporamaTemplateTag", mappedBy="diaporamaTemplate", cascade={"persist"}, orphanRemoval=true)
  43.      */
  44.     private $diaporamaTemplateTags;
  45.     /**
  46.      * @ORM\Column(type="datetime", nullable=true)
  47.      */
  48.     private $createdAt;
  49.     /**
  50.      * @ORM\Column(type="datetime", nullable=true)
  51.      */
  52.     private $updatedAt;
  53.     /**
  54.      * @ORM\Column(type="integer", nullable=true)
  55.      */
  56.     private $state;
  57.     public function __construct()
  58.     {
  59.         $this->blocks = new ArrayCollection();
  60.         $this->tags = new ArrayCollection();
  61.         $this->diaporamas = new ArrayCollection();
  62.         $this->diaporamaTemplateTags = new ArrayCollection();
  63.     }
  64.     public function getId() : ?int
  65.     {
  66.         return $this->id;
  67.     }
  68.     public function getName() : ?string
  69.     {
  70.         return $this->name;
  71.     }
  72.     public function setName(?string $name) : self
  73.     {
  74.         $this->name $name;
  75.         return $this;
  76.     }
  77.     public function getStartSortOne() : ?WebSort
  78.     {
  79.         return $this->startSortOne;
  80.     }
  81.     public function setStartSortOne(?WebSort $startSortOne) : self
  82.     {
  83.         $this->startSortOne $startSortOne;
  84.         return $this;
  85.     }
  86.     public function getStartSortTwo() : ?WebSort
  87.     {
  88.         return $this->startSortTwo;
  89.     }
  90.     public function setStartSortTwo(?WebSort $startSortTwo) : self
  91.     {
  92.         $this->startSortTwo $startSortTwo;
  93.         return $this;
  94.     }
  95.     public function getStartSortThree() : ?WebSort
  96.     {
  97.         return $this->startSortThree;
  98.     }
  99.     public function setStartSortThree(?WebSort $startSortThree) : self
  100.     {
  101.         $this->startSortThree $startSortThree;
  102.         return $this;
  103.     }
  104.     /**
  105.      * @return Collection|Tag[]
  106.      */
  107.     public function getTags() : Collection
  108.     {
  109.         return $this->tags;
  110.     }
  111.     public function addTag(Tag $tag) : self
  112.     {
  113.         if (!$this->tags->contains($tag)) {
  114.             $this->tags[] = $tag;
  115.         }
  116.         return $this;
  117.     }
  118.     public function removeTag(Tag $tag) : self
  119.     {
  120.         if ($this->tags->contains($tag)) {
  121.             $this->tags->removeElement($tag);
  122.         }
  123.         return $this;
  124.     }
  125.     public function getCreatedAt() : ?\DateTimeInterface
  126.     {
  127.         return $this->createdAt;
  128.     }
  129.     public function setCreatedAt(?\DateTimeInterface $createdAt) : self
  130.     {
  131.         $this->createdAt $createdAt;
  132.         return $this;
  133.     }
  134.     public function getUpdatedAt() : ?\DateTimeInterface
  135.     {
  136.         return $this->updatedAt;
  137.     }
  138.     public function setUpdatedAt(?\DateTimeInterface $updatedAt) : self
  139.     {
  140.         $this->updatedAt $updatedAt;
  141.         return $this;
  142.     }
  143.     public function getState() : ?int
  144.     {
  145.         return $this->state;
  146.     }
  147.     public function setState(?int $state) : self
  148.     {
  149.         $this->state $state;
  150.         return $this;
  151.     }
  152.     public function getTwigPath() : ?string
  153.     {
  154.         return $this->twigPath;
  155.     }
  156.     public function setTwigPath(string $twigPath) : self
  157.     {
  158.         $this->twigPath $twigPath;
  159.         return $this;
  160.     }
  161.     /**
  162.      * @return Collection|Diaporama[]
  163.      */
  164.     public function getDiaporamas() : Collection
  165.     {
  166.         return $this->diaporamas;
  167.     }
  168.     public function addDiaporama(Diaporama $diaporama) : self
  169.     {
  170.         if (!$this->diaporamas->contains($diaporama)) {
  171.             $this->diaporamas[] = $diaporama;
  172.             $diaporama->setDiaporamaTemplate($this);
  173.         }
  174.         return $this;
  175.     }
  176.     public function removeDiaporama(Diaporama $diaporama) : self
  177.     {
  178.         if ($this->diaporamas->contains($diaporama)) {
  179.             $this->diaporamas->removeElement($diaporama);
  180.             // set the owning side to null (unless already changed)
  181.             if ($diaporama->getDiaporamaTemplate() === $this) {
  182.                 $diaporama->setDiaporamaTemplate(null);
  183.             }
  184.         }
  185.         return $this;
  186.     }
  187.     public function getThumbnail() : ?string
  188.     {
  189.         return $this->thumbnail;
  190.     }
  191.     public function setThumbnail(string $thumbnail) : self
  192.     {
  193.         $this->thumbnail $thumbnail;
  194.         return $this;
  195.     }
  196.     public function getThumbnailInfos() : ?string
  197.     {
  198.         return $this->thumbnailInfos;
  199.     }
  200.     public function setThumbnailInfos(?string $thumbnailInfos) : self
  201.     {
  202.         $this->thumbnailInfos $thumbnailInfos;
  203.         return $this;
  204.     }
  205.     public function getKey() : ?string
  206.     {
  207.         return $this->key;
  208.     }
  209.     public function setKey(?string $key) : self
  210.     {
  211.         $this->key $key;
  212.         return $this;
  213.     }
  214.     /**
  215.      * @return Collection|DiaporamaTemplateTag[]
  216.      */
  217.     public function getDiaporamaTemplateTags() : Collection
  218.     {
  219.         return $this->diaporamaTemplateTags;
  220.     }
  221.     public function addDiaporamaTemplateTag(DiaporamaTemplateTag $diaporamaTemplateTag) : self
  222.     {
  223.         if (!$this->diaporamaTemplateTags->contains($diaporamaTemplateTag)) {
  224.             $this->diaporamaTemplateTags[] = $diaporamaTemplateTag;
  225.             $diaporamaTemplateTag->setDiaporamaTemplate($this);
  226.         }
  227.         return $this;
  228.     }
  229.     public function removeDiaporamaTemplateTag(DiaporamaTemplateTag $diaporamaTemplateTag) : self
  230.     {
  231.         if ($this->diaporamaTemplateTags->contains($diaporamaTemplateTag)) {
  232.             $this->diaporamaTemplateTags->removeElement($diaporamaTemplateTag);
  233.             // set the owning side to null (unless already changed)
  234.             if ($diaporamaTemplateTag->getDiaporamaTemplate() === $this) {
  235.                 $diaporamaTemplateTag->setDiaporamaTemplate(null);
  236.             }
  237.         }
  238.         return $this;
  239.     }
  240. }