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