src/Entity/EditionCoverTemplate.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\EditionCoverTemplateRepository")
  8.  */
  9. class EditionCoverTemplate
  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\EditionCoverTemplateParameterGroup", 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\EditionModeleRubrique", mappedBy="cover", cascade={"persist"})
  60.      * @ORM\OrderBy({"ordering" = "ASC"})
  61.      */
  62.     private $rubriques;
  63.     public function __construct()
  64.     {
  65.         $this->parameterGroups = new ArrayCollection();
  66.         $this->rubriques = new ArrayCollection();
  67.     }
  68.     public function getId() : ?int
  69.     {
  70.         return $this->id;
  71.     }
  72.     public function getName() : ?string
  73.     {
  74.         return $this->name;
  75.     }
  76.     public function setName(?string $name) : self
  77.     {
  78.         $this->name $name;
  79.         return $this;
  80.     }
  81.     public function getDocumentation() : ?string
  82.     {
  83.         return $this->documentation;
  84.     }
  85.     public function setDocumentation(?string $documentation) : self
  86.     {
  87.         $this->documentation $documentation;
  88.         return $this;
  89.     }
  90.     public function getGabaritName() : ?string
  91.     {
  92.         return $this->gabaritName;
  93.     }
  94.     public function setGabaritName(?string $gabaritName) : self
  95.     {
  96.         $this->gabaritName $gabaritName;
  97.         return $this;
  98.     }
  99.     public function getThumbnail() : ?string
  100.     {
  101.         return $this->thumbnail;
  102.     }
  103.     public function setThumbnail(?string $thumbnail) : self
  104.     {
  105.         $this->thumbnail $thumbnail;
  106.         return $this;
  107.     }
  108.     public function getPreview() : ?string
  109.     {
  110.         return $this->preview;
  111.     }
  112.     public function setPreview(?string $preview) : self
  113.     {
  114.         $this->preview $preview;
  115.         return $this;
  116.     }
  117.     public function getKey() : ?string
  118.     {
  119.         return $this->key;
  120.     }
  121.     public function setKey(?string $key) : self
  122.     {
  123.         $this->key $key;
  124.         return $this;
  125.     }
  126.     public function getSizeKey() : ?string
  127.     {
  128.         return $this->sizeKey;
  129.     }
  130.     public function setSizeKey(?string $sizeKey) : self
  131.     {
  132.         $this->sizeKey $sizeKey;
  133.         return $this;
  134.     }
  135.     public function getParams() : ?array
  136.     {
  137.         return $this->params;
  138.     }
  139.     public function setParams(?array $params) : self
  140.     {
  141.         $this->params $params;
  142.         return $this;
  143.     }
  144.     /**
  145.      * @return Collection|EditionCoverTemplateParameterGroup[]
  146.      */
  147.     public function getParameterGroups() : Collection
  148.     {
  149.         return $this->parameterGroups;
  150.     }
  151.     public function addParameterGroup(EditionCoverTemplateParameterGroup $parameterGroup) : self
  152.     {
  153.         if (!$this->parameterGroups->contains($parameterGroup)) {
  154.             $this->parameterGroups[] = $parameterGroup;
  155.             $parameterGroup->setTemplate($this);
  156.         }
  157.         return $this;
  158.     }
  159.     public function removeParameterGroup(EditionCoverTemplateParameterGroup $parameterGroup) : self
  160.     {
  161.         if ($this->parameterGroups->contains($parameterGroup)) {
  162.             $this->parameterGroups->removeElement($parameterGroup);
  163.             // set the owning side to null (unless already changed)
  164.             if ($parameterGroup->getTemplate() === $this) {
  165.                 $parameterGroup->setTemplate(null);
  166.             }
  167.         }
  168.         return $this;
  169.     }
  170.     /**
  171.      * @return Collection|EditionModeleRubrique[]
  172.      */
  173.     public function getRubriques() : Collection
  174.     {
  175.         return $this->rubriques;
  176.     }
  177.     public function addRubrique(EditionModeleRubrique $rubrique) : self
  178.     {
  179.         if (!$this->rubriques->contains($rubrique)) {
  180.             $this->rubriques[] = $rubrique;
  181.             $rubrique->setCover($this);
  182.         }
  183.         return $this;
  184.     }
  185.     public function removeRubrique(EditionModeleRubrique $rubrique) : self
  186.     {
  187.         if ($this->rubriques->contains($rubrique)) {
  188.             $this->rubriques->removeElement($rubrique);
  189.             // set the owning side to null (unless already changed)
  190.             if ($rubrique->getCover() === $this) {
  191.                 $rubrique->setCover(null);
  192.             }
  193.         }
  194.         return $this;
  195.     }
  196. }