<?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\EditionTemplateRepository")
*/
class EditionTemplate
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Nom du template"})
*/
private $name;
/**
* @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Clé du template"})
*/
private $key;
/**
* @ORM\Column(type="string", length=255, nullable=true, options={"comment":"URL du fichier CSS du template"})
*/
private $urlCss;
/**
* @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Dossier de rangement du template"})
*/
private $templateFolder;
/**
* @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin du service"})
*/
private $serviceName;
/**
* @ORM\Column(type="boolean", nullable=false, options={"default":true})
*/
private $visibleForAll;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="App\Entity\DnsitEntity")
* @ORM\JoinTable(name="edition_template_entity",
* joinColumns={@ORM\JoinColumn(name="template_id", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="entity_id", referencedColumnName="id")}
* )
*/
private $authorizedEntities;
/**
* @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin de la documentation"})
*/
private $documentation;
/**
* @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin du thumbnail"})
*/
private $thumbnail;
/**
* @ORM\Column(type="json", nullable=true, options={"comment":"Parametres techniques"})
*/
private $params;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionTemplateParameterGroup", mappedBy="template", cascade={"persist","remove"})
* @ORM\OrderBy({"ordering" = "ASC"})
*/
private $parameterGroups;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionTemplateGabarit", mappedBy="template", cascade={"persist","remove"}, orphanRemoval=true)
* @ORM\OrderBy({"ordering" = "ASC"})
*/
private $gabarits;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionTemplateTetiere", mappedBy="template", cascade={"persist","remove"}, orphanRemoval=true)
* @ORM\OrderBy({"ordering" = "ASC"})
*/
private $tetieres;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionTemplateEntete", mappedBy="template", cascade={"persist","remove"}, orphanRemoval=true)
* @ORM\OrderBy({"ordering" = "ASC"})
*/
private $entetes;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionTemplatePied", mappedBy="template", cascade={"persist","remove"}, orphanRemoval=true)
* @ORM\OrderBy({"ordering" = "ASC"})
*/
private $pieds;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionTemplateVariant", mappedBy="template", cascade={"persist","remove"})
* @ORM\OrderBy({"ordering" = "ASC"})
*/
private $variants;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionModele", mappedBy="template", cascade={"persist","remove"})
*/
private $modeles;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\OneToMany(targetEntity="App\Entity\EditionModeleRubriqueDynamiqueModele", mappedBy="template", cascade={"persist","remove"})
*/
private $modeleRubriqueDynamiqueModeles;
public function __construct()
{
$this->authorizedEntities = new ArrayCollection();
$this->parameterGroups = new ArrayCollection();
$this->gabarits = new ArrayCollection();
$this->tetieres = new ArrayCollection();
$this->entetes = new ArrayCollection();
$this->pieds = new ArrayCollection();
$this->modeles = new ArrayCollection();
$this->modeleRubriqueDynamiqueModeles = new ArrayCollection();
$this->variants = 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 getKey() : ?string
{
return $this->key;
}
public function setKey(?string $key) : self
{
$this->key = $key;
return $this;
}
public function getUrlCss() : ?string
{
return $this->urlCss;
}
public function setUrlCss(?string $url) : self
{
$this->urlCss = $url;
return $this;
}
public function getTemplateFolder() : ?string
{
return $this->templateFolder;
}
public function setTemplateFolder(?string $folder) : self
{
$this->templateFolder = $folder;
return $this;
}
public function getServiceName() : ?string
{
return $this->serviceName;
}
public function setServiceName(?string $serviceName) : self
{
$this->serviceName = $serviceName;
return $this;
}
public function getVisibleForAll() : ?bool
{
return $this->visibleForAll;
}
public function setVisibleForAll(bool $visibleForAll) : self
{
$this->visibleForAll = $visibleForAll;
return $this;
}
/**
* @return Collection|DnsitEntity[]
*/
public function getAuthorizedEntities() : Collection
{
return $this->authorizedEntities;
}
public function addAuthorizedEntity(DnsitEntity $authorizedEntity) : self
{
if (!$this->authorizedEntities->contains($authorizedEntity)) {
$this->authorizedEntities[] = $authorizedEntity;
}
return $this;
}
public function removeAuthorizedEntity(DnsitEntity $authorizedEntity) : self
{
if ($this->authorizedEntities->contains($authorizedEntity)) {
$this->authorizedEntities->removeElement($authorizedEntity);
}
return $this;
}
public function getDocumentation() : ?string
{
return $this->documentation;
}
public function setDocumentation(?string $documentation) : self
{
$this->documentation = $documentation;
return $this;
}
public function getThumbnail() : ?string
{
return $this->thumbnail;
}
public function setThumbnail(?string $thumbnail) : self
{
$this->thumbnail = $thumbnail;
return $this;
}
/**
* @return Collection|EditionTemplateParameterGroup[]
*/
public function getParameterGroups() : Collection
{
return $this->parameterGroups;
}
public function addParameterGroup(EditionTemplateParameterGroup $parameterGroup) : self
{
if (!$this->parameterGroups->contains($parameterGroup)) {
$this->parameterGroups[] = $parameterGroup;
$parameterGroup->setTemplate($this);
}
return $this;
}
public function removeParameterGroup(EditionTemplateParameterGroup $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|EditionTemplateGabarit[]
*/
public function getGabarits() : Collection
{
return $this->gabarits;
}
public function addGabarit(EditionTemplateGabarit $gabarit) : self
{
if (!$this->gabarits->contains($gabarit)) {
$this->gabarits[] = $gabarit;
$gabarit->setTemplate($this);
}
return $this;
}
public function removeGabarit(EditionTemplateGabarit $gabarit) : self
{
if ($this->gabarits->contains($gabarit)) {
$this->gabarits->removeElement($gabarit);
// set the owning side to null (unless already changed)
if ($gabarit->getTemplate() === $this) {
$gabarit->setTemplate(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->setTemplate($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->getTemplate() === $this) {
$tetiere->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->setTemplate($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->getTemplate() === $this) {
$entete->setTemplate(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->setTemplate($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->getTemplate() === $this) {
$pied->setTemplate(null);
}
}
return $this;
}
/**
* @return Collection|EditionModele[]
*/
public function getModeles() : Collection
{
return $this->modeles;
}
public function addModele(EditionModele $modele) : self
{
if (!$this->modeles->contains($modele)) {
$this->modeles[] = $modele;
$modele->setTemplate($this);
}
return $this;
}
public function removeModele(EditionModele $modele) : self
{
if ($this->modeles->contains($modele)) {
$this->modeles->removeElement($modele);
// set the owning side to null (unless already changed)
if ($modele->getTemplate() === $this) {
$modele->setTemplate(null);
}
}
return $this;
}
/**
* @return Collection|EditionModeleRubriqueDynamiqueModele[]
*/
public function getModeleRubriqueDynamiqueModeles() : Collection
{
return $this->modeleRubriqueDynamiqueModeles;
}
public function addModeleRubriqueDynamiqueModele(EditionModeleRubriqueDynamiqueModele $modeleRubrique) : self
{
if (!$this->modeleRubriqueDynamiqueModeles->contains($modeleRubrique)) {
$this->modeleRubriqueDynamiqueModeles[] = $modeleRubrique;
$modeleRubrique->setTemplate($this);
}
return $this;
}
public function removeModeleRubriqueDynamiqueModele(EditionModeleRubriqueDynamiqueModele $modeleRubrique) : self
{
if ($this->modeleRubriqueDynamiqueModeles->contains($modeleRubrique)) {
$this->modeleRubriqueDynamiqueModeles->removeElement($modeleRubrique);
// set the owning side to null (unless already changed)
if ($modeleRubrique->getTemplate() === $this) {
$modeleRubrique->setTemplate(null);
}
}
return $this;
}
/**
* @return Collection|EditionTemplateVariant[]
*/
public function getVariants() : Collection
{
return $this->variants;
}
public function addVariant(EditionTemplateVariant $variant) : self
{
if (!$this->variants->contains($variant)) {
$this->variants[] = $variant;
$variant->setTemplate($this);
}
return $this;
}
public function removeVariant(EditionTemplateVariant $variant) : self
{
if ($this->variants->contains($variant)) {
$this->variants->removeElement($variant);
// set the owning side to null (unless already changed)
if ($variant->getTemplate() === $this) {
$variant->setTemplate(null);
}
}
return $this;
}
public function getParams() : ?array
{
return $this->params;
}
public function setParams(?array $params) : self
{
$this->params = $params;
return $this;
}
}