src/Entity/EditionModeleRubrique.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\CustomCode;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
  8. use Symfony\Component\Serializer\Annotation\Context;
  9. use DateTime;
  10. /**
  11.  * @ORM\Entity (repositoryClass="App\Repository\EditionModeleRubriqueRepository")
  12.  */
  13. class EditionModeleRubrique
  14. {
  15.     /**
  16.      * @ORM\Id()
  17.      * @ORM\GeneratedValue()
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="string", nullable=true)
  23.      */
  24.     private $name;
  25.     /**
  26.      * @ORM\Column(type="string", nullable=true, options={"comment":"Type de rubrique: 'SAUT', 'DYNAMIQUE', 'IMAGE', 'CONTENTS' ou 'COVER'"})
  27.      */
  28.     private $type;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionModele", inversedBy="rubriques")
  31.      * @ORM\JoinColumns({
  32.      *   @ORM\JoinColumn(name="modele_id", referencedColumnName="id", onDelete="CASCADE")
  33.      * })
  34.      */
  35.     private $modele;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionTemplateGabarit", inversedBy="rubriques", cascade={"persist"})
  38.      * @ORM\JoinColumns({
  39.      *   @ORM\JoinColumn(name="gabarit_id", referencedColumnName="id")
  40.      * })
  41.      */
  42.     private $gabarit;
  43.     /**
  44.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionModeleRubriqueDynamiqueModele", inversedBy="rubriques", cascade={"persist"})
  45.      * @ORM\JoinColumns({
  46.      *   @ORM\JoinColumn(name="rubrique_dynamique_modele_id", referencedColumnName="id")
  47.      * })
  48.      */
  49.     private $modeleRubriqueDynamique;
  50.     /**
  51.      * @ORM\ManyToMany(targetEntity="App\Entity\CustomCode", inversedBy="editionModeleRubriques")
  52.      */
  53.     private $customCodes;
  54.     /**
  55.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionTemplateTetiere", inversedBy="rubriques", cascade={"persist"})
  56.      * @ORM\JoinColumns({
  57.      *   @ORM\JoinColumn(name="tetiere_id", referencedColumnName="id")
  58.      * })
  59.      */
  60.     private $tetiere;
  61.     /**
  62.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionTemplateEntete", inversedBy="rubriques", cascade={"persist"})
  63.      * @ORM\JoinColumns({
  64.      *   @ORM\JoinColumn(name="entete_id", referencedColumnName="id")
  65.      * })
  66.      */
  67.     private $entete;
  68.     /**
  69.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionTemplatePied", inversedBy="rubriques", cascade={"persist"})
  70.      * @ORM\JoinColumns({
  71.      *   @ORM\JoinColumn(name="pied_id", referencedColumnName="id")
  72.      * })
  73.      */
  74.     private ?EditionTemplatePied $pied;
  75.     /**
  76.      * @ORM\Column(type="integer", nullable=true)
  77.      */
  78.     private $ordering;
  79.     /**
  80.      * @ORM\Column(type="json", nullable=true)
  81.      */
  82.     private $displayConditions;
  83.     /**
  84.      * @ORM\Column(type="string", nullable=true, options={"comment":"Type de réorganisation des fiches : 'NONE', 'PERIOD' ou 'DAY'"})
  85.      */
  86.     private $duplicateProductsBy;
  87.     /**
  88.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionContentsPageTemplate", inversedBy="rubriques", cascade={"persist"})
  89.      * @ORM\JoinColumns({
  90.      *   @ORM\JoinColumn(name="contents_id", referencedColumnName="id")
  91.      * })
  92.      */
  93.     private ?EditionContentsPageTemplate $contentsPage;
  94.     /**
  95.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionCoverTemplate", inversedBy="rubriques", cascade={"persist"})
  96.      * @ORM\JoinColumns({
  97.      *   @ORM\JoinColumn(name="cover_id", referencedColumnName="id")
  98.      * })
  99.      */
  100.     private ?EditionCoverTemplate $cover;
  101.     /**
  102.      * @ORM\ManyToOne(targetEntity="App\Entity\EditionNotesPageTemplate", inversedBy="rubriques", cascade={"persist"})
  103.      * @ORM\JoinColumns({
  104.      *   @ORM\JoinColumn(name="notes_id", referencedColumnName="id")
  105.      * })
  106.      */
  107.     private ?EditionNotesPageTemplate $notesPage;
  108.     /**
  109.      * @var Collection
  110.      *
  111.      * @ORM\OneToMany(targetEntity="App\Entity\EditionModeleRubriqueParameter", mappedBy="rubrique", cascade={"persist","remove"}, orphanRemoval=true)
  112.      * @ORM\OrderBy({"ordering" = "ASC"})
  113.      */
  114.     private $parameters;
  115.     /**
  116.      * @var Collection
  117.      *
  118.      * @ORM\OneToMany(targetEntity="App\Entity\EditionModeleContentsRubriqueParameter", mappedBy="rubrique", cascade={"persist","remove"}, orphanRemoval=true)
  119.      * @ORM\OrderBy({"ordering" = "ASC"})
  120.      */
  121.     private $contentsPageParameters;
  122.     /**
  123.      * @var Collection
  124.      *
  125.      * @ORM\OneToMany(targetEntity="App\Entity\EditionModeleCoverRubriqueParameter", mappedBy="rubrique", cascade={"persist","remove"}, orphanRemoval=true)
  126.      * @ORM\OrderBy({"ordering" = "ASC"})
  127.      */
  128.     private $coverParameters;
  129.     /**
  130.      * @var Collection
  131.      *
  132.      * @ORM\OneToMany(targetEntity="App\Entity\EditionModeleNotesRubriqueParameter", mappedBy="rubrique", cascade={"persist","remove"}, orphanRemoval=true)
  133.      * @ORM\OrderBy({"ordering" = "ASC"})
  134.      */
  135.     private $notesPageParameters;
  136.     /**
  137.      * @var Collection
  138.      *
  139.      * @ORM\OneToMany(targetEntity="App\Entity\EditionModeleRubriqueZone", mappedBy="rubrique", cascade={"persist","remove"}, orphanRemoval=true)
  140.      * @ORM\OrderBy({"ordering" = "ASC"})
  141.      */
  142.     private $zones;
  143.     /**
  144.      * @ORM\Column(type="json", nullable=true, options={"comment":"Images (+rs langues)"})
  145.      */
  146.     private $images;
  147.     /**
  148.      * @ORM\Column(type="json", nullable=true, options={"comment":"Images avec traits de coupe (+rs langues)"})
  149.      */
  150.     private $imagesCropMarks;
  151.     /**
  152.      * @ORM\ManyToOne(targetEntity="App\Entity\WebSort", inversedBy="editionRubriquesStartSortOne")
  153.      * @ORM\JoinColumns({
  154.      *   @ORM\JoinColumn(name="start_sort_one_id", referencedColumnName="id")
  155.      * })
  156.      */
  157.     private $startSortOne;
  158.     /**
  159.      * @ORM\ManyToOne(targetEntity="App\Entity\WebSort", inversedBy="editionRubriquesStartSortTwo")
  160.      * @ORM\JoinColumns({
  161.      *   @ORM\JoinColumn(name="start_sort_two_id", referencedColumnName="id")
  162.      * })
  163.      */
  164.     private $startSortTwo;
  165.     /**
  166.      * @ORM\ManyToOne(targetEntity="App\Entity\WebSort", inversedBy="editionRubriquesStartSortThree")
  167.      * @ORM\JoinColumns({
  168.      *   @ORM\JoinColumn(name="start_sort_three_id", referencedColumnName="id")
  169.      * })
  170.      */
  171.     private $startSortThree;
  172.     /**
  173.      * @var Collection
  174.      *
  175.      * @ORM\OneToMany(targetEntity="App\Entity\EditionModeleRubriqueLegende", mappedBy="rubrique", cascade={"persist","remove"})
  176.      * @ORM\OrderBy({"ordering" = "ASC"})
  177.      */
  178.     private $rubriqueLegendes;
  179.     /**
  180.      * @ORM\Column(type="boolean", nullable=true, options={"default":true, "comment":"Cette rubrique doit-elle apparaître dans le sommaire ?"})
  181.      */
  182.     private ?bool $isInContentsPage;
  183.     /**
  184.      * @ORM\Column(type="boolean", nullable=true, options={"default":false, "comment":"Afficher un index dans le sommaire ?"})
  185.      */
  186.     private ?bool $hasIndexInContentsPage;
  187.     /**
  188.      * @ORM\Column(type="string", length=255, options={"comment":"Intitulé de la rubrique dans le sommaire"}, nullable=true)
  189.      */
  190.     private ?string $labelInContents;
  191.     /**
  192.      * @ORM\Column(type="string", length=255, options={"comment":"Identifiant unique"}, nullable=true)
  193.      */
  194.     private ?string $uniqueIdentifier;
  195.     /**
  196.      * @ORM\Column(type="json", nullable=true)
  197.      */
  198.     private ?array $labelInContentsTranslations;
  199.     /**
  200.      * @ORM\Column(type="json", nullable=true)
  201.      */
  202.     private ?array $labelStyleInContents;
  203.     /**
  204.      * @ORM\Column(type="json", nullable=true)
  205.      */
  206.     private ?array $indexStyleInContents;
  207.     /**
  208.      * @ORM\Column(type="json", nullable=true)
  209.      * Contenu total d'une rubrique sommaire
  210.      */
  211.     private ?array $sommaireContent;
  212.     /**
  213.      * @ORM\Column(type="boolean", nullable=true, options={"default":false})
  214.      */
  215.     private ?bool $hasDynamicAnnonces;
  216.     /**
  217.      * @ORM\ManyToOne(targetEntity="App\Entity\TagAnnonce", inversedBy="rubriques", cascade={"persist"})
  218.      * @ORM\JoinColumns({
  219.      *   @ORM\JoinColumn(name="tag_annonce_id", referencedColumnName="id")
  220.      * })
  221.      */
  222.     private ?TagAnnonce $tagAnnonce;
  223.     /**
  224.      * @ORM\Column(type="string", length=500, options={"comment":"Zone de texte pour la page sommaire+légende"}, nullable=true)
  225.      */
  226.     private ?string $textZone;
  227.     /**
  228.      * @ORM\Column(type="json", nullable=true)
  229.      */
  230.     private ?array $textZoneTranslations;
  231.     /**
  232.      * @var Collection
  233.      *
  234.      * @ORM\OneToMany(targetEntity="App\Entity\EditionModeleRubriqueAnnonce", mappedBy="rubrique", cascade={"persist","remove"}, orphanRemoval=true)
  235.      * @ORM\OrderBy({"ordering" = "ASC"})
  236.      */
  237.     private $rubriqueAnnonces;
  238.     /**
  239.      * @ORM\Column(type="json", nullable=true, options={"comment":"Parametres techniques"})
  240.      */
  241.     private $params;
  242.     /**
  243.      * @ORM\Column(type="date", nullable=true)
  244.      * @Context({ DateTimeNormalizer::FORMAT_KEY = "Y-m-d" })
  245.      */
  246.     private ?\DateTimeInterface $startPublicationDate;
  247.     /**
  248.      * @ORM\Column(type="date", nullable=true)
  249.      * @Context({ DateTimeNormalizer::FORMAT_KEY = "Y-m-d" })
  250.      */
  251.     private ?\DateTimeInterface $endPublicationDate;
  252.     public function __construct()
  253.     {
  254.         $this->parameters = new ArrayCollection();
  255.         $this->contentsPageParameters = new ArrayCollection();
  256.         $this->coverParameters = new ArrayCollection();
  257.         $this->notesPageParameters = new ArrayCollection();
  258.         $this->zones = new ArrayCollection();
  259.         $this->rubriqueLegendes = new ArrayCollection();
  260.         $this->rubriqueAnnonces = new ArrayCollection();
  261.         $this->customCodes = new ArrayCollection();
  262.     }
  263.     public function getId() : ?int
  264.     {
  265.         return $this->id;
  266.     }
  267.     public function getOrdering() : ?int
  268.     {
  269.         return $this->ordering;
  270.     }
  271.     public function setOrdering(?int $ordering) : self
  272.     {
  273.         $this->ordering $ordering;
  274.         return $this;
  275.     }
  276.     public function getModele() : ?EditionModele
  277.     {
  278.         return $this->modele;
  279.     }
  280.     public function setModele(?EditionModele $modele) : self
  281.     {
  282.         $this->modele $modele;
  283.         return $this;
  284.     }
  285.     /**
  286.      * @return Collection|EditionModeleRubriqueParameter[]
  287.      */
  288.     public function getParameters() : Collection
  289.     {
  290.         return $this->parameters;
  291.     }
  292.     public function addParameter(EditionModeleRubriqueParameter $parameter) : self
  293.     {
  294.         if (!$this->parameters->contains($parameter)) {
  295.             $this->parameters[] = $parameter;
  296.             $parameter->setRubrique($this);
  297.         }
  298.         return $this;
  299.     }
  300.     public function removeParameter(EditionModeleRubriqueParameter $parameter) : self
  301.     {
  302.         if ($this->parameters->contains($parameter)) {
  303.             $this->parameters->removeElement($parameter);
  304.             // set the owning side to null (unless already changed)
  305.             if ($parameter->getRubrique() === $this) {
  306.                 $parameter->setRubrique(null);
  307.             }
  308.         }
  309.         return $this;
  310.     }
  311.     /**
  312.      * @return Collection|EditionModeleContentsRubriqueParameter[]
  313.      */
  314.     public function getContentsPageParameters() : Collection
  315.     {
  316.         return $this->contentsPageParameters;
  317.     }
  318.     public function addContentsPageParameter(EditionModeleContentsRubriqueParameter $contentsPageParameter) : self
  319.     {
  320.         if (!$this->contentsPageParameters->contains($contentsPageParameter)) {
  321.             $this->contentsPageParameters[] = $contentsPageParameter;
  322.             $contentsPageParameter->setRubrique($this);
  323.         }
  324.         return $this;
  325.     }
  326.     public function removeContentsPageParameter(EditionModeleContentsRubriqueParameter $contentsPageParameter) : self
  327.     {
  328.         if ($this->contentsPageParameters->contains($contentsPageParameter)) {
  329.             $this->contentsPageParameters->removeElement($contentsPageParameter);
  330.             // set the owning side to null (unless already changed)
  331.             if ($contentsPageParameter->getRubrique() === $this) {
  332.                 $contentsPageParameter->setRubrique(null);
  333.             }
  334.         }
  335.         return $this;
  336.     }
  337.     /**
  338.      * @return Collection|EditionModeleCoverRubriqueParameter[]
  339.      */
  340.     public function getCoverParameters() : Collection
  341.     {
  342.         return $this->coverParameters;
  343.     }
  344.     public function addCoverParameter(EditionModeleCoverRubriqueParameter $coverParameter) : self
  345.     {
  346.         if (!$this->coverParameters->contains($coverParameter)) {
  347.             $this->coverParameters[] = $coverParameter;
  348.             $coverParameter->setRubrique($this);
  349.         }
  350.         return $this;
  351.     }
  352.     public function removeCoverParameter(EditionModeleCoverRubriqueParameter $coverParameter) : self
  353.     {
  354.         if ($this->coverParameters->contains($coverParameter)) {
  355.             $this->coverParameters->removeElement($coverParameter);
  356.             // set the owning side to null (unless already changed)
  357.             if ($coverParameter->getRubrique() === $this) {
  358.                 $coverParameter->setRubrique(null);
  359.             }
  360.         }
  361.         return $this;
  362.     }
  363.     /**
  364.      * @return Collection|EditionModeleNotesRubriqueParameter[]
  365.      */
  366.     public function getNotesPageParameters() : Collection
  367.     {
  368.         return $this->notesPageParameters;
  369.     }
  370.     public function addNotesPageParameter(EditionModeleNotesRubriqueParameter $notesPageParameter) : self
  371.     {
  372.         if (!$this->notesPageParameters->contains($notesPageParameter)) {
  373.             $this->notesPageParameters[] = $notesPageParameter;
  374.             $notesPageParameter->setRubrique($this);
  375.         }
  376.         return $this;
  377.     }
  378.     public function removeNotesPageParameter(EditionModeleNotesRubriqueParameter $notesPageParameter) : self
  379.     {
  380.         if ($this->notesPageParameters->contains($notesPageParameter)) {
  381.             $this->notesPageParameters->removeElement($notesPageParameter);
  382.             // set the owning side to null (unless already changed)
  383.             if ($notesPageParameter->getRubrique() === $this) {
  384.                 $notesPageParameter->setRubrique(null);
  385.             }
  386.         }
  387.         return $this;
  388.     }
  389.     /**
  390.      * @return Collection|EditionModeleRubriqueZone[]
  391.      */
  392.     public function getZones() : Collection
  393.     {
  394.         return $this->zones;
  395.     }
  396.     public function addZone(EditionModeleRubriqueZone $zone) : self
  397.     {
  398.         if (!$this->zones->contains($zone)) {
  399.             $this->zones[] = $zone;
  400.             $zone->setRubrique($this);
  401.         }
  402.         return $this;
  403.     }
  404.     public function removeZone(EditionModeleRubriqueZone $zone) : self
  405.     {
  406.         if ($this->zones->contains($zone)) {
  407.             $this->zones->removeElement($zone);
  408.             // set the owning side to null (unless already changed)
  409.             if ($zone->getRubrique() === $this) {
  410.                 $zone->setRubrique(null);
  411.             }
  412.         }
  413.         return $this;
  414.     }
  415.     public function getName() : ?string
  416.     {
  417.         return $this->name;
  418.     }
  419.     public function setName(?string $name) : self
  420.     {
  421.         $this->name $name;
  422.         return $this;
  423.     }
  424.     public function getType() : ?string
  425.     {
  426.         return $this->type;
  427.     }
  428.     public function setType(?string $type) : self
  429.     {
  430.         $this->type $type;
  431.         return $this;
  432.     }
  433.     public function getDisplayConditions() : ?array
  434.     {
  435.         return $this->displayConditions;
  436.     }
  437.     public function setDisplayConditions(?array $displayConditions) : self
  438.     {
  439.         $this->displayConditions $displayConditions;
  440.         return $this;
  441.     }
  442.     public function getGabarit() : ?EditionTemplateGabarit
  443.     {
  444.         return $this->gabarit;
  445.     }
  446.     public function setGabarit(?EditionTemplateGabarit $gabarit) : self
  447.     {
  448.         $this->gabarit $gabarit;
  449.         return $this;
  450.     }
  451.     public function getModeleRubriqueDynamique() : ?EditionModeleRubriqueDynamiqueModele
  452.     {
  453.         return $this->modeleRubriqueDynamique;
  454.     }
  455.     public function setModeleRubriqueDynamique(?EditionModeleRubriqueDynamiqueModele $modeleRubriqueDynamique) : self
  456.     {
  457.         $this->modeleRubriqueDynamique $modeleRubriqueDynamique;
  458.         return $this;
  459.     }
  460.     public function getTetiere() : ?EditionTemplateTetiere
  461.     {
  462.         return $this->tetiere;
  463.     }
  464.     public function setTetiere(?EditionTemplateTetiere $tetiere) : self
  465.     {
  466.         $this->tetiere $tetiere;
  467.         return $this;
  468.     }
  469.     public function getEntete() : ?EditionTemplateEntete
  470.     {
  471.         return $this->entete;
  472.     }
  473.     public function setEntete(?EditionTemplateEntete $entete) : self
  474.     {
  475.         $this->entete $entete;
  476.         return $this;
  477.     }
  478.     public function getPied() : ?EditionTemplatePied
  479.     {
  480.         return $this->pied;
  481.     }
  482.     public function setPied(?EditionTemplatePied $pied) : self
  483.     {
  484.         $this->pied $pied;
  485.         return $this;
  486.     }
  487.     public function getImages() : ?array
  488.     {
  489.         return $this->images;
  490.     }
  491.     public function setImages(?array $images) : self
  492.     {
  493.         $this->images $images;
  494.         return $this;
  495.     }
  496.     public function getImagesCropMarks() : ?array
  497.     {
  498.         return $this->imagesCropMarks;
  499.     }
  500.     public function setImagesCropMarks(?array $imagesCropMarks) : self
  501.     {
  502.         $this->imagesCropMarks $imagesCropMarks;
  503.         return $this;
  504.     }
  505.     public function getStartSortOne() : ?WebSort
  506.     {
  507.         return $this->startSortOne;
  508.     }
  509.     public function setStartSortOne(?WebSort $startSortOne) : self
  510.     {
  511.         $this->startSortOne $startSortOne;
  512.         return $this;
  513.     }
  514.     public function getStartSortTwo() : ?WebSort
  515.     {
  516.         return $this->startSortTwo;
  517.     }
  518.     public function setStartSortTwo(?WebSort $startSortTwo) : self
  519.     {
  520.         $this->startSortTwo $startSortTwo;
  521.         return $this;
  522.     }
  523.     public function getStartSortThree() : ?WebSort
  524.     {
  525.         return $this->startSortThree;
  526.     }
  527.     public function setStartSortThree(?WebSort $startSortThree) : self
  528.     {
  529.         $this->startSortThree $startSortThree;
  530.         return $this;
  531.     }
  532.     public function getDuplicateProductsBy() : ?string
  533.     {
  534.         return $this->duplicateProductsBy;
  535.     }
  536.     public function setDuplicateProductsBy(?string $duplicateProductsBy) : self
  537.     {
  538.         $this->duplicateProductsBy $duplicateProductsBy;
  539.         return $this;
  540.     }
  541.     public function getContentsPage() : ?EditionContentsPageTemplate
  542.     {
  543.         return $this->contentsPage;
  544.     }
  545.     public function setContentsPage(?EditionContentsPageTemplate $contentsPage) : self
  546.     {
  547.         $this->contentsPage $contentsPage;
  548.         return $this;
  549.     }
  550.     public function getCover() : ?EditionCoverTemplate
  551.     {
  552.         return $this->cover;
  553.     }
  554.     public function setCover(?EditionCoverTemplate $cover) : self
  555.     {
  556.         $this->cover $cover;
  557.         return $this;
  558.     }
  559.     public function getNotesPage() : ?EditionNotesPageTemplate
  560.     {
  561.         return $this->notesPage;
  562.     }
  563.     public function setNotesPage(?EditionNotesPageTemplate $notesPage) : self
  564.     {
  565.         $this->notesPage $notesPage;
  566.         return $this;
  567.     }
  568.     public function getIsInContentsPage() : ?bool
  569.     {
  570.         return $this->isInContentsPage;
  571.     }
  572.     public function setIsInContentsPage(?bool $isInContentsPage) : self
  573.     {
  574.         $this->isInContentsPage $isInContentsPage;
  575.         return $this;
  576.     }
  577.     public function getHasIndexInContentsPage() : ?bool
  578.     {
  579.         return $this->hasIndexInContentsPage;
  580.     }
  581.     public function setHasIndexInContentsPage(?bool $hasIndexInContentsPage) : self
  582.     {
  583.         $this->hasIndexInContentsPage $hasIndexInContentsPage;
  584.         return $this;
  585.     }
  586.     public function getLabelInContents() : ?string
  587.     {
  588.         return $this->labelInContents;
  589.     }
  590.     public function setLabelInContents(?string $labelInContents) : self
  591.     {
  592.         $this->labelInContents $labelInContents;
  593.         return $this;
  594.     }
  595.     public function getUniqueIdentifier() : ?string
  596.     {
  597.         return $this->uniqueIdentifier;
  598.     }
  599.     public function setUniqueIdentifier(?string $uniqueIdentifier) : self
  600.     {
  601.         $this->uniqueIdentifier $uniqueIdentifier;
  602.         return $this;
  603.     }
  604.     public function getLabelInContentsTranslations() : ?array
  605.     {
  606.         return $this->labelInContentsTranslations;
  607.     }
  608.     public function setLabelInContentsTranslations(?array $labelInContentsTranslations) : self
  609.     {
  610.         $this->labelInContentsTranslations $labelInContentsTranslations;
  611.         return $this;
  612.     }
  613.     public function getLabelStyleInContents() : ?array
  614.     {
  615.         return $this->labelStyleInContents;
  616.     }
  617.     public function setLabelStyleInContents(?array $labelStyleInContents) : self
  618.     {
  619.         $this->labelStyleInContents $labelStyleInContents;
  620.         return $this;
  621.     }
  622.     public function getIndexStyleInContents() : ?array
  623.     {
  624.         return $this->indexStyleInContents;
  625.     }
  626.     public function setIndexStyleInContents(?array $indexStyleInContents) : self
  627.     {
  628.         $this->indexStyleInContents $indexStyleInContents;
  629.         return $this;
  630.     }
  631.     public function getSommaireContent() : ?array
  632.     {
  633.         return $this->sommaireContent;
  634.     }
  635.     public function setSommaireContent(?array $sommaireContent) : self
  636.     {
  637.         $this->sommaireContent $sommaireContent;
  638.         return $this;
  639.     }
  640.     public function getHasDynamicAnnonces(): ?bool
  641.     {
  642.         return $this->hasDynamicAnnonces;
  643.     }
  644.     public function setHasDynamicAnnonces(?bool $hasDynamicAnnonces): self
  645.     {
  646.         $this->hasDynamicAnnonces $hasDynamicAnnonces;
  647.         return $this;
  648.     }
  649.     public function getTagAnnonce() : ?TagAnnonce
  650.     {
  651.         return $this->tagAnnonce;
  652.     }
  653.     public function setTagAnnonce(?TagAnnonce $tagAnnonce) : self
  654.     {
  655.         $this->tagAnnonce $tagAnnonce;
  656.         return $this;
  657.     }
  658.     public function getTextZone() : ?string
  659.     {
  660.         return $this->textZone;
  661.     }
  662.     public function setTextZone(?string $textZone) : self
  663.     {
  664.         $this->textZone $textZone;
  665.         return $this;
  666.     }
  667.     public function getTextZoneTranslations() : ?array
  668.     {
  669.         return $this->textZoneTranslations;
  670.     }
  671.     public function setTextZoneTranslations(?array $textZoneTranslations) : self
  672.     {
  673.         $this->textZoneTranslations $textZoneTranslations;
  674.         return $this;
  675.     }
  676.     /**
  677.      * @return Collection|EditionModeleRubriqueLegendes[]
  678.      */
  679.     public function getRubriqueLegendes() : Collection
  680.     {
  681.         return $this->rubriqueLegendes;
  682.     }
  683.     public function addRubriqueLegende(EditionModeleRubriqueLegende $rubriqueLegende) : self
  684.     {
  685.         if (!$this->rubriqueLegendes->contains($rubriqueLegende)) {
  686.             $this->rubriqueLegendes[] = $rubriqueLegende;
  687.             // ajouter aussi la relation correspondante de l'autre côté pour éviter les incohérences
  688.             $rubriqueLegende->setRubrique($this);
  689.         }
  690.         return $this;
  691.     }
  692.     public function removeRubriqueLegende(EditionModeleRubriqueLegende $rubriqueLegende) : self
  693.     {
  694.         if ($this->rubriqueLegendes->contains($rubriqueLegende)) {
  695.             $this->rubriqueLegendes->removeElement($rubriqueLegende);
  696.             // passer l'autre côté à null pour éviter les incohérences
  697.             if ($rubriqueLegende->getRubrique() === $this) {
  698.                 $rubriqueLegende->setRubrique(null);
  699.             }
  700.         }
  701.         return $this;
  702.     }
  703.     /**
  704.      * @return Collection|EditionModeleRubriqueAnnonces[]
  705.      */
  706.     public function getRubriqueAnnonces() : Collection
  707.     {
  708.         return $this->rubriqueAnnonces;
  709.     }
  710.     public function addRubriqueAnnonce(EditionModeleRubriqueAnnonce $rubriqueAnnonce) : self
  711.     {
  712.         if (!$this->rubriqueAnnonces->contains($rubriqueAnnonce)) {
  713.             $this->rubriqueAnnonces[] = $rubriqueAnnonce;
  714.             // ajouter aussi la relation correspondante de l'autre côté pour éviter les incohérences
  715.             $rubriqueAnnonce->setRubrique($this);
  716.         }
  717.         return $this;
  718.     }
  719.     public function removeRubriqueAnnonce(EditionModeleRubriqueAnnonce $rubriqueAnnonce) : self
  720.     {
  721.         if ($this->rubriqueAnnonces->contains($rubriqueAnnonce)) {
  722.             $this->rubriqueAnnonces->removeElement($rubriqueAnnonce);
  723.             // passer l'autre côté à null pour éviter les incohérences
  724.             if ($rubriqueAnnonce->getRubrique() === $this) {
  725.                 $rubriqueAnnonce->setRubrique(null);
  726.             }
  727.         }
  728.         return $this;
  729.     }
  730.     public function getParams() : ?array
  731.     {
  732.         return $this->params;
  733.     }
  734.     public function setParams(?array $params) : self
  735.     {
  736.         $this->params $params;
  737.         return $this;
  738.     }
  739.     public function getStartPublicationDate() : ?\DateTimeInterface
  740.     {
  741.         return $this->startPublicationDate;
  742.     }
  743.     public function setStartPublicationDate(?\DateTime $newDate) : ?\DateTimeInterface
  744.     {
  745.         $this->startPublicationDate $newDate;
  746.         // $this->startPublicationDate = $newDate ? clone $newDate : new DateTime("1111-04-10");
  747.         return $this->startPublicationDate;
  748.     }
  749.     public function getEndPublicationDate() : ?\DateTimeInterface
  750.     {
  751.         return $this->endPublicationDate;
  752.     }
  753.     public function setEndPublicationDate(?DateTime $newDate null) : ?\DateTimeInterface
  754.     {
  755.         $this->endPublicationDate $newDate;
  756.         return $this->endPublicationDate;
  757.     }
  758.     /**
  759.      * @return Collection|CustomCode[]
  760.      */
  761.     public function getCustomCodes () : Collection
  762.     {
  763.         return $this->customCodes;
  764.     }
  765.     public function addCustomCode (CustomCode $code) : self
  766.     {
  767.         if (!$this->customCodes->contains($code)) {
  768.             $this->customCodes[] = $code;
  769.         }
  770.         return $this;
  771.     }
  772.     public function removeCustomCode(CustomCode $code) : self
  773.     {
  774.         if ($this->customCodes->contains($code)) {
  775.             $this->customCodes->removeElement($code);
  776.         }
  777.         return $this;
  778.     }
  779. }