<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity (repositoryClass="App\Repository\DiaporamaTemplateRepository")
*/
class DiaporamaTemplate
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $key;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $name;
/**
* @ORM\Column(type="string",length=1000, nullable=false)
*/
private $thumbnail;
/**
* @ORM\Column(type="string",length=1000, nullable=true)
*/
private $thumbnailInfos;
/**
* @ORM\Column(type="string",length=1000, nullable=false)
*/
private $twigPath;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Diaporama", mappedBy="diaporamaTemplate")
*/
private $diaporamas;
/**
* @ORM\OneToMany(targetEntity="App\Entity\DiaporamaTemplateTag", mappedBy="diaporamaTemplate", cascade={"persist"}, orphanRemoval=true)
*/
private $diaporamaTemplateTags;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $state;
public function __construct()
{
$this->blocks = new ArrayCollection();
$this->tags = new ArrayCollection();
$this->diaporamas = new ArrayCollection();
$this->diaporamaTemplateTags = 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 getStartSortOne() : ?WebSort
{
return $this->startSortOne;
}
public function setStartSortOne(?WebSort $startSortOne) : self
{
$this->startSortOne = $startSortOne;
return $this;
}
public function getStartSortTwo() : ?WebSort
{
return $this->startSortTwo;
}
public function setStartSortTwo(?WebSort $startSortTwo) : self
{
$this->startSortTwo = $startSortTwo;
return $this;
}
public function getStartSortThree() : ?WebSort
{
return $this->startSortThree;
}
public function setStartSortThree(?WebSort $startSortThree) : self
{
$this->startSortThree = $startSortThree;
return $this;
}
/**
* @return Collection|Tag[]
*/
public function getTags() : Collection
{
return $this->tags;
}
public function addTag(Tag $tag) : self
{
if (!$this->tags->contains($tag)) {
$this->tags[] = $tag;
}
return $this;
}
public function removeTag(Tag $tag) : self
{
if ($this->tags->contains($tag)) {
$this->tags->removeElement($tag);
}
return $this;
}
public function getCreatedAt() : ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt) : self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt() : ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt) : self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getState() : ?int
{
return $this->state;
}
public function setState(?int $state) : self
{
$this->state = $state;
return $this;
}
public function getTwigPath() : ?string
{
return $this->twigPath;
}
public function setTwigPath(string $twigPath) : self
{
$this->twigPath = $twigPath;
return $this;
}
/**
* @return Collection|Diaporama[]
*/
public function getDiaporamas() : Collection
{
return $this->diaporamas;
}
public function addDiaporama(Diaporama $diaporama) : self
{
if (!$this->diaporamas->contains($diaporama)) {
$this->diaporamas[] = $diaporama;
$diaporama->setDiaporamaTemplate($this);
}
return $this;
}
public function removeDiaporama(Diaporama $diaporama) : self
{
if ($this->diaporamas->contains($diaporama)) {
$this->diaporamas->removeElement($diaporama);
// set the owning side to null (unless already changed)
if ($diaporama->getDiaporamaTemplate() === $this) {
$diaporama->setDiaporamaTemplate(null);
}
}
return $this;
}
public function getThumbnail() : ?string
{
return $this->thumbnail;
}
public function setThumbnail(string $thumbnail) : self
{
$this->thumbnail = $thumbnail;
return $this;
}
public function getThumbnailInfos() : ?string
{
return $this->thumbnailInfos;
}
public function setThumbnailInfos(?string $thumbnailInfos) : self
{
$this->thumbnailInfos = $thumbnailInfos;
return $this;
}
public function getKey() : ?string
{
return $this->key;
}
public function setKey(?string $key) : self
{
$this->key = $key;
return $this;
}
/**
* @return Collection|DiaporamaTemplateTag[]
*/
public function getDiaporamaTemplateTags() : Collection
{
return $this->diaporamaTemplateTags;
}
public function addDiaporamaTemplateTag(DiaporamaTemplateTag $diaporamaTemplateTag) : self
{
if (!$this->diaporamaTemplateTags->contains($diaporamaTemplateTag)) {
$this->diaporamaTemplateTags[] = $diaporamaTemplateTag;
$diaporamaTemplateTag->setDiaporamaTemplate($this);
}
return $this;
}
public function removeDiaporamaTemplateTag(DiaporamaTemplateTag $diaporamaTemplateTag) : self
{
if ($this->diaporamaTemplateTags->contains($diaporamaTemplateTag)) {
$this->diaporamaTemplateTags->removeElement($diaporamaTemplateTag);
// set the owning side to null (unless already changed)
if ($diaporamaTemplateTag->getDiaporamaTemplate() === $this) {
$diaporamaTemplateTag->setDiaporamaTemplate(null);
}
}
return $this;
}
}