<?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\EditionTemplateEnteteRepository")
*/
class EditionTemplateEntete
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\EditionTemplate", inversedBy="entetes")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="template_id", referencedColumnName="id", onDelete="CASCADE")
* })
*/
private $template;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\EditionContentsPageTemplate", inversedBy="entetes")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="contents_template_id", referencedColumnName="id", onDelete="CASCADE")
* })
*/
private $contentsPageTemplate;
/**
* @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Nom du gabarit d'entête"})
*/
private $name;
/**
* @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Clé texte du gabarit d'entête"})
*/
private $key;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $ordering;
/**
* @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin du thumbnail"})
*/
private $thumbnail;
/**
* @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin de l'illustration"})
*/
private ?string $preview;
/**
* @ORM\Column(type="json", nullable=true, options={"comment":"Parametres techniques"})
*/
private $params;
/**
* @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Dossier où sont stockés les twig de l'entête"})
*/
private $twigPath;
/**
* @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin du fichier css de la feuille de style de l'entête"})
*/
private $cssPath;
/**
* @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin de la documentation"})
*/
private $documentation;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionModeleRubrique", mappedBy="entete", cascade={"persist"})
* @ORM\OrderBy({"ordering" = "ASC"})
*/
private $rubriques;
public function __construct()
{
$this->rubriques = 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 getOrdering() : ?int
{
return $this->ordering;
}
public function setOrdering(?int $ordering) : self
{
$this->ordering = $ordering;
return $this;
}
public function getTemplate() : ?EditionTemplate
{
return $this->template;
}
public function setTemplate(?EditionTemplate $template) : self
{
$this->template = $template;
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 getTwigPath() : ?string
{
return $this->twigPath;
}
public function setTwigPath(?string $path) : self
{
$this->twigPath = $path;
return $this;
}
public function getCssPath() : ?string
{
return $this->cssPath;
}
public function setCssPath(?string $path) : self
{
$this->cssPath = $path;
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->setEntete($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->getEntete() === $this) {
$rubrique->setEntete(null);
}
}
return $this;
}
public function getKey() : ?string
{
return $this->key;
}
public function setKey(?string $key) : self
{
$this->key = $key;
return $this;
}
public function getParams() : ?array
{
return $this->params;
}
public function setParams(?array $params) : self
{
$this->params = $params;
return $this;
}
public function getContentsPageTemplate() : ?EditionContentsPageTemplate
{
return $this->contentsPageTemplate;
}
public function setContentsPageTemplate(?EditionContentsPageTemplate $contentsPageTemplate) : self
{
$this->contentsPageTemplate = $contentsPageTemplate;
return $this;
}
}