src/Entity/EditionContentsPageTemplate.php line 13

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\EditionContentsPageTemplateRepository")
  8.  */
  9. class EditionContentsPageTemplate
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private ?int $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Nom du template"})
  19.      */
  20.     private ?string $name;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private ?string $gabaritName;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      */
  28.     private ?string $thumbnail;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private ?string $preview;
  33.     /**
  34.      * @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin de la documentation"})
  35.      */
  36.     private $documentation;
  37.     /**
  38.      * @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Clé texte du template"})
  39.      */
  40.     private ?string $key;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true) options={"comment":"Format du template"})
  43.      */
  44.     private ?string $sizeKey;
  45.     /**
  46.      * @ORM\Column(type="json", nullable=true, options={"comment":"Parametres techniques"})
  47.      */
  48.     private ?array $params;
  49.     /**
  50.      * @var Collection
  51.      *
  52.      * @ORM\OneToMany(targetEntity="App\Entity\EditionContentsPageTemplateParameterGroup", mappedBy="template", cascade={"persist","remove"})
  53.      * @ORM\OrderBy({"ordering" = "ASC"})
  54.      */
  55.     private $parameterGroups;
  56.     /**
  57.      * @var Collection
  58.      *
  59.      * @ORM\OneToMany(targetEntity="App\Entity\EditionTemplateEntete", mappedBy="contentsPageTemplate", cascade={"persist","remove"}, orphanRemoval=true)
  60.      * @ORM\OrderBy({"ordering" = "ASC"})
  61.      */
  62.     private $entetes;
  63.     /**
  64.      * @var Collection
  65.      *
  66.      * @ORM\OneToMany(targetEntity="App\Entity\EditionTemplateTetiere", mappedBy="contentsPageTemplate", cascade={"persist","remove"}, orphanRemoval=true)
  67.      * @ORM\OrderBy({"ordering" = "ASC"})
  68.      */
  69.     private $tetieres;
  70.     /**
  71.      * @var Collection
  72.      *
  73.      * @ORM\OneToMany(targetEntity="App\Entity\EditionTemplatePied", mappedBy="contentsPageTemplate", cascade={"persist","remove"}, orphanRemoval=true)
  74.      * @ORM\OrderBy({"ordering" = "ASC"})
  75.      */
  76.     private $pieds;
  77.     /**
  78.      * @ORM\Column(type="boolean", nullable=true, options={"default":true, "comment":"TRUE si le template possède un sommaire"})
  79.      */
  80.     private ?bool $hasTableOfContents;
  81.     /**
  82.      * @ORM\Column(type="boolean", nullable=true, options={"default":true, "comment":"TRUE si le template possède une légende de pictos"})
  83.      */
  84.     private ?bool $hasLegende;
  85.     /**
  86.      * @var Collection
  87.      *
  88.      * @ORM\OneToMany(targetEntity="App\Entity\EditionModeleRubrique", mappedBy="contentsPage", cascade={"persist"})
  89.      * @ORM\OrderBy({"ordering" = "ASC"})
  90.      */
  91.     private $rubriques;
  92.     public function __construct()
  93.     {
  94.         $this->rubriques = new ArrayCollection();
  95.         $this->parameterGroups = new ArrayCollection();
  96.         $this->entetes = new ArrayCollection();
  97.         $this->tetieres = new ArrayCollection();
  98.         $this->pieds = new ArrayCollection();
  99.     }
  100.     public function getId() : ?int
  101.     {
  102.         return $this->id;
  103.     }
  104.     public function getName() : ?string
  105.     {
  106.         return $this->name;
  107.     }
  108.     public function setName(?string $name) : self
  109.     {
  110.         $this->name $name;
  111.         return $this;
  112.     }
  113.     public function getDocumentation() : ?string
  114.     {
  115.         return $this->documentation;
  116.     }
  117.     public function setDocumentation(?string $documentation) : self
  118.     {
  119.         $this->documentation $documentation;
  120.         return $this;
  121.     }
  122.     public function getGabaritName() : ?string
  123.     {
  124.         return $this->gabaritName;
  125.     }
  126.     public function setGabaritName(?string $gabaritName) : self
  127.     {
  128.         $this->gabaritName $gabaritName;
  129.         return $this;
  130.     }
  131.     public function getThumbnail() : ?string
  132.     {
  133.         return $this->thumbnail;
  134.     }
  135.     public function setThumbnail(?string $thumbnail) : self
  136.     {
  137.         $this->thumbnail $thumbnail;
  138.         return $this;
  139.     }
  140.     public function getPreview() : ?string
  141.     {
  142.         return $this->preview;
  143.     }
  144.     public function setPreview(?string $preview) : self
  145.     {
  146.         $this->preview $preview;
  147.         return $this;
  148.     }
  149.     public function getKey() : ?string
  150.     {
  151.         return $this->key;
  152.     }
  153.     public function setKey(?string $key) : self
  154.     {
  155.         $this->key $key;
  156.         return $this;
  157.     }
  158.     public function getSizeKey() : ?string
  159.     {
  160.         return $this->sizeKey;
  161.     }
  162.     public function setSizeKey(?string $sizeKey) : self
  163.     {
  164.         $this->sizeKey $sizeKey;
  165.         return $this;
  166.     }
  167.     public function getParams() : ?array
  168.     {
  169.         return $this->params;
  170.     }
  171.     public function setParams(?array $params) : self
  172.     {
  173.         $this->params $params;
  174.         return $this;
  175.     }
  176.     /**
  177.      * @return Collection|EditionContentsPageTemplateParameterGroup[]
  178.      */
  179.     public function getParameterGroups() : Collection
  180.     {
  181.         return $this->parameterGroups;
  182.     }
  183.     public function addParameterGroup(EditionContentsPageTemplateParameterGroup $parameterGroup) : self
  184.     {
  185.         if (!$this->parameterGroups->contains($parameterGroup)) {
  186.             $this->parameterGroups[] = $parameterGroup;
  187.             $parameterGroup->setTemplate($this);
  188.         }
  189.         return $this;
  190.     }
  191.     public function removeParameterGroup(EditionContentsPageTemplateParameterGroup $parameterGroup) : self
  192.     {
  193.         if ($this->parameterGroups->contains($parameterGroup)) {
  194.             $this->parameterGroups->removeElement($parameterGroup);
  195.             // set the owning side to null (unless already changed)
  196.             if ($parameterGroup->getTemplate() === $this) {
  197.                 $parameterGroup->setTemplate(null);
  198.             }
  199.         }
  200.         return $this;
  201.     }
  202.     /**
  203.      * @return Collection|EditionTemplateEntete[]
  204.      */
  205.     public function getEntetes() : Collection
  206.     {
  207.         return $this->entetes;
  208.     }
  209.     public function addEntete(EditionTemplateEntete $entete) : self
  210.     {
  211.         if (!$this->entetes->contains($entete)) {
  212.             $this->entetes[] = $entete;
  213.             $entete->setContentsPageTemplate($this);
  214.         }
  215.         return $this;
  216.     }
  217.     public function removeEntete(EditionTemplateEntete $entete) : self
  218.     {
  219.         if ($this->entetes->contains($entete)) {
  220.             $this->entetes->removeElement($entete);
  221.             // set the owning side to null (unless already changed)
  222.             if ($entete->getContentsPageTemplate() === $this) {
  223.                 $entete->setContentsPageTemplate(null);
  224.             }
  225.         }
  226.         return $this;
  227.     }
  228.     /**
  229.      * @return Collection|EditionTemplateTetiere[]
  230.      */
  231.     public function getTetieres() : Collection
  232.     {
  233.         return $this->tetieres;
  234.     }
  235.     public function addTetiere(EditionTemplateTetiere $tetiere) : self
  236.     {
  237.         if (!$this->tetieres->contains($tetiere)) {
  238.             $this->tetieres[] = $tetiere;
  239.             $tetiere->setContentsPageTemplate($this);
  240.         }
  241.         return $this;
  242.     }
  243.     public function removeTetiere(EditionTemplateTetiere $tetiere) : self
  244.     {
  245.         if ($this->tetieres->contains($tetiere)) {
  246.             $this->tetieres->removeElement($tetiere);
  247.             // set the owning side to null (unless already changed)
  248.             if ($tetiere->getContentsPageTemplate() === $this) {
  249.                 $tetiere->setContentsPageTemplate(null);
  250.             }
  251.         }
  252.         return $this;
  253.     }
  254.     /**
  255.      * @return Collection|EditionTemplatePied[]
  256.      */
  257.     public function getPieds() : Collection
  258.     {
  259.         return $this->pieds;
  260.     }
  261.     public function addPied(EditionTemplatePied $pied) : self
  262.     {
  263.         if (!$this->pieds->contains($pied)) {
  264.             $this->pieds[] = $pied;
  265.             $pied->setContentsPageTemplate($this);
  266.         }
  267.         return $this;
  268.     }
  269.     public function removePied(EditionTemplatePied $pied) : self
  270.     {
  271.         if ($this->pieds->contains($pied)) {
  272.             $this->pieds->removeElement($pied);
  273.             // set the owning side to null (unless already changed)
  274.             if ($pied->getContentsPageTemplate() === $this) {
  275.                 $pied->setContentsPageTemplate(null);
  276.             }
  277.         }
  278.         return $this;
  279.     }
  280.     public function getHasTableOfContents() : ?bool
  281.     {
  282.         return $this->hasTableOfContents;
  283.     }
  284.     public function setHasTableOfContents(?bool $hasTableOfContents) : self
  285.     {
  286.         $this->hasTableOfContents $hasTableOfContents;
  287.         return $this;
  288.     }
  289.     public function getHasLegende() : ?bool
  290.     {
  291.         return $this->hasLegende;
  292.     }
  293.     public function setHasLegende(?bool $hasLegende) : self
  294.     {
  295.         $this->hasLegende $hasLegende;
  296.         return $this;
  297.     }
  298.     /**
  299.      * @return Collection|EditionModeleRubrique[]
  300.      */
  301.     public function getRubriques() : Collection
  302.     {
  303.         return $this->rubriques;
  304.     }
  305.     public function addRubrique(EditionModeleRubrique $rubrique) : self
  306.     {
  307.         if (!$this->rubriques->contains($rubrique)) {
  308.             $this->rubriques[] = $rubrique;
  309.             $rubrique->setContentsPage($this);
  310.         }
  311.         return $this;
  312.     }
  313.     public function removeRubrique(EditionModeleRubrique $rubrique) : self
  314.     {
  315.         if ($this->rubriques->contains($rubrique)) {
  316.             $this->rubriques->removeElement($rubrique);
  317.             // set the owning side to null (unless already changed)
  318.             if ($rubrique->getContentsPage() === $this) {
  319.                 $rubrique->setContentsPage(null);
  320.             }
  321.         }
  322.         return $this;
  323.     }
  324. }