src/Entity/EditionTemplateEntete.php line 14

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