<?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\EditionContentsPageTemplateRepository")
*/
class EditionContentsPageTemplate
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private ?int $id;
/**
* @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Nom du template"})
*/
private ?string $name;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $gabaritName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $thumbnail;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $preview;
/**
* @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin de la documentation"})
*/
private $documentation;
/**
* @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Clé texte du template"})
*/
private ?string $key;
/**
* @ORM\Column(type="string", length=255, nullable=true) options={"comment":"Format du template"})
*/
private ?string $sizeKey;
/**
* @ORM\Column(type="json", nullable=true, options={"comment":"Parametres techniques"})
*/
private ?array $params;
/**
* @var Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionContentsPageTemplateParameterGroup", mappedBy="template", cascade={"persist","remove"})
* @ORM\OrderBy({"ordering" = "ASC"})
*/
private $parameterGroups;
/**
* @var Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionTemplateEntete", mappedBy="contentsPageTemplate", cascade={"persist","remove"}, orphanRemoval=true)
* @ORM\OrderBy({"ordering" = "ASC"})
*/
private $entetes;
/**
* @var Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionTemplateTetiere", mappedBy="contentsPageTemplate", cascade={"persist","remove"}, orphanRemoval=true)
* @ORM\OrderBy({"ordering" = "ASC"})
*/
private $tetieres;
/**
* @var Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionTemplatePied", mappedBy="contentsPageTemplate", cascade={"persist","remove"}, orphanRemoval=true)
* @ORM\OrderBy({"ordering" = "ASC"})
*/
private $pieds;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default":true, "comment":"TRUE si le template possède un sommaire"})
*/
private ?bool $hasTableOfContents;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default":true, "comment":"TRUE si le template possède une légende de pictos"})
*/
private ?bool $hasLegende;
/**
* @var Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionModeleRubrique", mappedBy="contentsPage", cascade={"persist"})
* @ORM\OrderBy({"ordering" = "ASC"})
*/
private $rubriques;
public function __construct()
{
$this->rubriques = new ArrayCollection();
$this->parameterGroups = new ArrayCollection();
$this->entetes = new ArrayCollection();
$this->tetieres = new ArrayCollection();
$this->pieds = 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 getDocumentation() : ?string
{
return $this->documentation;
}
public function setDocumentation(?string $documentation) : self
{
$this->documentation = $documentation;
return $this;
}
public function getGabaritName() : ?string
{
return $this->gabaritName;
}
public function setGabaritName(?string $gabaritName) : self
{
$this->gabaritName = $gabaritName;
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;
}
public function getKey() : ?string
{
return $this->key;
}
public function setKey(?string $key) : self
{
$this->key = $key;
return $this;
}
public function getSizeKey() : ?string
{
return $this->sizeKey;
}
public function setSizeKey(?string $sizeKey) : self
{
$this->sizeKey = $sizeKey;
return $this;
}
public function getParams() : ?array
{
return $this->params;
}
public function setParams(?array $params) : self
{
$this->params = $params;
return $this;
}
/**
* @return Collection|EditionContentsPageTemplateParameterGroup[]
*/
public function getParameterGroups() : Collection
{
return $this->parameterGroups;
}
public function addParameterGroup(EditionContentsPageTemplateParameterGroup $parameterGroup) : self
{
if (!$this->parameterGroups->contains($parameterGroup)) {
$this->parameterGroups[] = $parameterGroup;
$parameterGroup->setTemplate($this);
}
return $this;
}
public function removeParameterGroup(EditionContentsPageTemplateParameterGroup $parameterGroup) : self
{
if ($this->parameterGroups->contains($parameterGroup)) {
$this->parameterGroups->removeElement($parameterGroup);
// set the owning side to null (unless already changed)
if ($parameterGroup->getTemplate() === $this) {
$parameterGroup->setTemplate(null);
}
}
return $this;
}
/**
* @return Collection|EditionTemplateEntete[]
*/
public function getEntetes() : Collection
{
return $this->entetes;
}
public function addEntete(EditionTemplateEntete $entete) : self
{
if (!$this->entetes->contains($entete)) {
$this->entetes[] = $entete;
$entete->setContentsPageTemplate($this);
}
return $this;
}
public function removeEntete(EditionTemplateEntete $entete) : self
{
if ($this->entetes->contains($entete)) {
$this->entetes->removeElement($entete);
// set the owning side to null (unless already changed)
if ($entete->getContentsPageTemplate() === $this) {
$entete->setContentsPageTemplate(null);
}
}
return $this;
}
/**
* @return Collection|EditionTemplateTetiere[]
*/
public function getTetieres() : Collection
{
return $this->tetieres;
}
public function addTetiere(EditionTemplateTetiere $tetiere) : self
{
if (!$this->tetieres->contains($tetiere)) {
$this->tetieres[] = $tetiere;
$tetiere->setContentsPageTemplate($this);
}
return $this;
}
public function removeTetiere(EditionTemplateTetiere $tetiere) : self
{
if ($this->tetieres->contains($tetiere)) {
$this->tetieres->removeElement($tetiere);
// set the owning side to null (unless already changed)
if ($tetiere->getContentsPageTemplate() === $this) {
$tetiere->setContentsPageTemplate(null);
}
}
return $this;
}
/**
* @return Collection|EditionTemplatePied[]
*/
public function getPieds() : Collection
{
return $this->pieds;
}
public function addPied(EditionTemplatePied $pied) : self
{
if (!$this->pieds->contains($pied)) {
$this->pieds[] = $pied;
$pied->setContentsPageTemplate($this);
}
return $this;
}
public function removePied(EditionTemplatePied $pied) : self
{
if ($this->pieds->contains($pied)) {
$this->pieds->removeElement($pied);
// set the owning side to null (unless already changed)
if ($pied->getContentsPageTemplate() === $this) {
$pied->setContentsPageTemplate(null);
}
}
return $this;
}
public function getHasTableOfContents() : ?bool
{
return $this->hasTableOfContents;
}
public function setHasTableOfContents(?bool $hasTableOfContents) : self
{
$this->hasTableOfContents = $hasTableOfContents;
return $this;
}
public function getHasLegende() : ?bool
{
return $this->hasLegende;
}
public function setHasLegende(?bool $hasLegende) : self
{
$this->hasLegende = $hasLegende;
return $this;
}
/**
* @return Collection|EditionModeleRubrique[]
*/
public function getRubriques() : Collection
{
return $this->rubriques;
}
public function addRubrique(EditionModeleRubrique $rubrique) : self
{
if (!$this->rubriques->contains($rubrique)) {
$this->rubriques[] = $rubrique;
$rubrique->setContentsPage($this);
}
return $this;
}
public function removeRubrique(EditionModeleRubrique $rubrique) : self
{
if ($this->rubriques->contains($rubrique)) {
$this->rubriques->removeElement($rubrique);
// set the owning side to null (unless already changed)
if ($rubrique->getContentsPage() === $this) {
$rubrique->setContentsPage(null);
}
}
return $this;
}
}