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