src/Entity/EditionTemplateEntete.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\EditionTemplateEnteteRepository")
  8.  */
  9. class EditionTemplateEntete
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionTemplate", inversedBy="entetes")
  19.      * @ORM\JoinColumns({
  20.      *   @ORM\JoinColumn(name="template_id", referencedColumnName="id", onDelete="CASCADE")
  21.      * })
  22.      */
  23.     private $template;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionContentsPageTemplate", inversedBy="entetes")
  26.      * @ORM\JoinColumns({
  27.      *   @ORM\JoinColumn(name="contents_template_id", referencedColumnName="id", onDelete="CASCADE")
  28.      * })
  29.      */
  30.     private $contentsPageTemplate;
  31.     /**
  32.      * @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Nom du gabarit d'entête"})
  33.      */
  34.     private $name;
  35.     /**
  36.      * @ORM\Column(type="string", length=255, nullable=true, options={"comment":"Clé texte du gabarit d'entête"})
  37.      */
  38.     private $key;
  39.     /**
  40.      * @ORM\Column(type="integer", nullable=true)
  41.      */
  42.     private $ordering;
  43.     /**
  44.      * @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin du thumbnail"})
  45.      */
  46.     private $thumbnail;
  47.     /**
  48.      * @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin de l'illustration"})
  49.      */
  50.     private ?string $preview;
  51.     /**
  52.      * @ORM\Column(type="json", nullable=true, options={"comment":"Parametres techniques"})
  53.      */
  54.     private $params;
  55.     /**
  56.      * @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Dossier où sont stockés les twig de l'entête"})
  57.      */
  58.     private $twigPath;
  59.     /**
  60.      * @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin du fichier css de la feuille de style de l'entête"})
  61.      */
  62.     private $cssPath;
  63.     /**
  64.      * @ORM\Column(type="string", length=1024, nullable=true, options={"comment":"Chemin de la documentation"})
  65.      */
  66.     private $documentation;
  67.     /**
  68.      * @var \Doctrine\Common\Collections\Collection
  69.      *
  70.      * @ORM\OneToMany(targetEntity="App\Entity\EditionModeleRubrique", mappedBy="entete", cascade={"persist"})
  71.      * @ORM\OrderBy({"ordering" = "ASC"})
  72.      */
  73.     private $rubriques;
  74.     public function __construct()
  75.     {
  76.         $this->rubriques = new ArrayCollection();
  77.     }
  78.     public function getId() : ?int
  79.     {
  80.         return $this->id;
  81.     }
  82.     public function getName() : ?string
  83.     {
  84.         return $this->name;
  85.     }
  86.     public function setName(?string $name) : self
  87.     {
  88.         $this->name $name;
  89.         return $this;
  90.     }
  91.     public function getDocumentation() : ?string
  92.     {
  93.         return $this->documentation;
  94.     }
  95.     public function setDocumentation(?string $documentation) : self
  96.     {
  97.         $this->documentation $documentation;
  98.         return $this;
  99.     }
  100.     public function getOrdering() : ?int
  101.     {
  102.         return $this->ordering;
  103.     }
  104.     public function setOrdering(?int $ordering) : self
  105.     {
  106.         $this->ordering $ordering;
  107.         return $this;
  108.     }
  109.     public function getTemplate() : ?EditionTemplate
  110.     {
  111.         return $this->template;
  112.     }
  113.     public function setTemplate(?EditionTemplate $template) : self
  114.     {
  115.         $this->template $template;
  116.         return $this;
  117.     }
  118.     public function getThumbnail() : ?string
  119.     {
  120.         return $this->thumbnail;
  121.     }
  122.     public function setThumbnail(?string $thumbnail) : self
  123.     {
  124.         $this->thumbnail $thumbnail;
  125.         return $this;
  126.     }
  127.     public function getPreview() : ?string
  128.     {
  129.         return $this->preview;
  130.     }
  131.     public function setPreview(?string $preview): self
  132.     {
  133.         $this->preview $preview;
  134.         return $this;
  135.     }
  136.     public function getTwigPath() : ?string
  137.     {
  138.         return $this->twigPath;
  139.     }
  140.     public function setTwigPath(?string $path) : self
  141.     {
  142.         $this->twigPath $path;
  143.         return $this;
  144.     }
  145.     public function getCssPath() : ?string
  146.     {
  147.         return $this->cssPath;
  148.     }
  149.     public function setCssPath(?string $path) : self
  150.     {
  151.         $this->cssPath $path;
  152.         return $this;
  153.     }
  154.     /**
  155.      * @return Collection|EditionModeleRubrique[]
  156.      */
  157.     public function getRubriques() : Collection
  158.     {
  159.         return $this->rubriques;
  160.     }
  161.     public function addRubrique(EditionModeleRubrique $rubrique) : self
  162.     {
  163.         if (!$this->rubriques->contains($rubrique)) {
  164.             $this->rubriques[] = $rubrique;
  165.             $rubrique->setEntete($this);
  166.         }
  167.         return $this;
  168.     }
  169.     public function removeRubrique(EditionModeleRubrique $rubrique) : self
  170.     {
  171.         if ($this->rubriques->contains($rubrique)) {
  172.             $this->rubriques->removeElement($rubrique);
  173.             // set the owning side to null (unless already changed)
  174.             if ($rubrique->getEntete() === $this) {
  175.                 $rubrique->setEntete(null);
  176.             }
  177.         }
  178.         return $this;
  179.     }
  180.     public function getKey() : ?string
  181.     {
  182.         return $this->key;
  183.     }
  184.     public function setKey(?string $key) : self
  185.     {
  186.         $this->key $key;
  187.         return $this;
  188.     }
  189.     public function getParams() : ?array
  190.     {
  191.         return $this->params;
  192.     }
  193.     public function setParams(?array $params) : self
  194.     {
  195.         $this->params $params;
  196.         return $this;
  197.     }
  198.     public function getContentsPageTemplate() : ?EditionContentsPageTemplate
  199.     {
  200.         return $this->contentsPageTemplate;
  201.     }
  202.     public function setContentsPageTemplate(?EditionContentsPageTemplate $contentsPageTemplate) : self
  203.     {
  204.         $this->contentsPageTemplate $contentsPageTemplate;
  205.         return $this;
  206.     }
  207. }