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