src/Entity/Epingle.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EpingleRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassEpingleRepository::class)]
  8. class Epingle implements \Stringable
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private int $id;
  14.     #[ORM\Column(type'string'length255nullabletrue)]
  15.     private ?string $titrenull;
  16.     #[ORM\Column(type'boolean'nullabletrue)]
  17.     private ?bool $active;
  18.     #[ORM\OneToMany(targetEntityPageAccueil::class, mappedBy'epingle')]
  19.     private mixed $pageAccueils;
  20.     #[ORM\Column(type'string'length255nullabletrue)]
  21.     private ?string $couleurnull;
  22.     #[ORM\Column(type'text'nullabletrue)]
  23.     private ?string $contenunull;
  24.     #[ORM\ManyToOne(targetEntityEpingleColor::class, inversedBy'epingles')]
  25.     private mixed $color;
  26.     #[ORM\Column(type'boolean'nullabletrue)]
  27.     private ?bool $visible_nordinfo;
  28.     #[ORM\Column(type'boolean'nullabletrue)]
  29.     private ?bool $visible_lenord;
  30.     #[ORM\Column(type'boolean'nullabletrue)]
  31.     private ?bool $visible_services;
  32.     #[ORM\Column(type'boolean'nullabletrue)]
  33.     private ?bool $visible_section_politiques;
  34.     #[ORM\Column(type'boolean'nullabletrue)]
  35.     private ?bool $visible_section_institution;
  36.     #[ORM\Column(type'boolean'nullabletrue)]
  37.     private ?bool $visible_section_services;
  38.     #[ORM\ManyToMany(targetEntityPolitiqueDepartementale::class, inversedBy'epingles')]
  39.     private mixed $visible_politiques;
  40.     #[ORM\ManyToMany(targetEntityPages::class, inversedBy'epingles')]
  41.     private mixed $visible_institutions;
  42.     #[ORM\ManyToMany(targetEntityService::class, inversedBy'epingles')]
  43.     private mixed $visible_services_entity;
  44.     #[ORM\ManyToMany(targetEntityDocument::class, inversedBy'epingles')]
  45.     private mixed $visible_documents;
  46.     #[ORM\Column(type'boolean'nullabletrue)]
  47.     private ?bool $visible_accueil_lenord;
  48.     #[ORM\Column(type'boolean'nullabletrue)]
  49.     private ?bool $visible_accueil_services;
  50.     #[ORM\Column(type'boolean'nullabletrue)]
  51.     private ?bool $visible_espace_documentaire;
  52.     #[ORM\Column(type'boolean'nullabletrue)]
  53.     private ?bool $visible_pages_legales_lenord;
  54.     #[ORM\Column(type'boolean'nullabletrue)]
  55.     private ?bool $visible_pages_legales_services;
  56.     #[ORM\Column(type'boolean'nullabletrue)]
  57.     private ?bool $visible_pages_legales_nordinfo;
  58.     #[ORM\Column(type'boolean'nullabletrue)]
  59.     private ?bool $visible_glossaire_lenord;
  60.     #[ORM\Column(type'boolean'nullabletrue)]
  61.     private ?bool $visible_glossaire_services;
  62.     #[ORM\Column(type'boolean'nullabletrue)]
  63.     private ?bool $visible_mesinfos;
  64.     #[ORM\Column(type'boolean'nullabletrue)]
  65.     private ?bool $visible_a_la_une;
  66.     #[ORM\Column(type'boolean'nullabletrue)]
  67.     private ?bool $visible_agenda;
  68.     #[ORM\Column(type'boolean'nullabletrue)]
  69.     private ?bool $visible_videos;
  70.     #[ORM\Column(type'boolean'nullabletrue)]
  71.     private ?bool $visible_nordinfo_ledepartement;
  72.     #[ORM\Column(type'boolean'nullabletrue)]
  73.     private ?bool $visible_cartographie;
  74.     #[ORM\ManyToMany(targetEntityPageSatellite::class, mappedBy'epingles')]
  75.     private Collection $pageSatellites;
  76.     public function __construct()
  77.     {
  78.         $this->pageAccueils = new ArrayCollection();
  79.         $this->visible_politiques = new ArrayCollection();
  80.         $this->visible_institutions = new ArrayCollection();
  81.         $this->visible_services_entity = new ArrayCollection();
  82.         $this->visible_documents = new ArrayCollection();
  83.         $this->pageSatellites = new ArrayCollection();
  84.     }
  85.     public function getId(): ?int
  86.     {
  87.         return $this->id;
  88.     }
  89.     public function getTitre(): ?string
  90.     {
  91.         return $this->titre;
  92.     }
  93.     public function setTitre(?string $titre): self
  94.     {
  95.         $this->titre $titre;
  96.         return $this;
  97.     }
  98.     public function getActive(): ?bool
  99.     {
  100.         return $this->active;
  101.     }
  102.     public function setActive(?bool $active): self
  103.     {
  104.         $this->active $active;
  105.         return $this;
  106.     }
  107.     /**
  108.      * @return Collection|PageAccueil[]
  109.      */
  110.     public function getPageAccueils(): Collection
  111.     {
  112.         return $this->pageAccueils;
  113.     }
  114.     public function addPageAccueil(PageAccueil $pageAccueil): self
  115.     {
  116.         if (!$this->pageAccueils->contains($pageAccueil)) {
  117.             $this->pageAccueils[] = $pageAccueil;
  118.             $pageAccueil->setEpingle($this);
  119.         }
  120.         return $this;
  121.     }
  122.     public function removePageAccueil(PageAccueil $pageAccueil): self
  123.     {
  124.         if ($this->pageAccueils->removeElement($pageAccueil)) {
  125.             // set the owning side to null (unless already changed)
  126.             if ($pageAccueil->getEpingle() === $this) {
  127.                 $pageAccueil->setEpingle(null);
  128.             }
  129.         }
  130.         return $this;
  131.     }
  132.     public function getCouleur(): ?string
  133.     {
  134.         return $this->couleur;
  135.     }
  136.     public function setCouleur(?string $couleur): self
  137.     {
  138.         $this->couleur $couleur;
  139.         return $this;
  140.     }
  141.     public function getContenu(): ?string
  142.     {
  143.         return $this->contenu;
  144.     }
  145.     public function setContenu(?string $contenu): self
  146.     {
  147.         $this->contenu $contenu;
  148.         return $this;
  149.     }
  150.     public function __toString(): string
  151.     {
  152.         return (string) $this->titre;
  153.     }
  154.     public function getColor(): ?EpingleColor
  155.     {
  156.         return $this->color;
  157.     }
  158.     public function setColor(?EpingleColor $color): self
  159.     {
  160.         $this->color $color;
  161.         return $this;
  162.     }
  163.     public function getVisibleNordinfo(): ?bool
  164.     {
  165.         return $this->visible_nordinfo;
  166.     }
  167.     public function setVisibleNordinfo(?bool $visible_nordinfo): self
  168.     {
  169.         $this->visible_nordinfo $visible_nordinfo;
  170.         return $this;
  171.     }
  172.     public function getVisibleLenord(): ?bool
  173.     {
  174.         return $this->visible_lenord;
  175.     }
  176.     public function setVisibleLenord(?bool $visible_lenord): self
  177.     {
  178.         $this->visible_lenord $visible_lenord;
  179.         return $this;
  180.     }
  181.     public function getVisibleServices(): ?bool
  182.     {
  183.         return $this->visible_services;
  184.     }
  185.     public function setVisibleServices(?bool $visible_services): self
  186.     {
  187.         $this->visible_services $visible_services;
  188.         return $this;
  189.     }
  190.     public function getVisibleSectionPolitiques(): ?bool
  191.     {
  192.         return $this->visible_section_politiques;
  193.     }
  194.     public function setVisibleSectionPolitiques(?bool $visible_section_politiques): self
  195.     {
  196.         $this->visible_section_politiques $visible_section_politiques;
  197.         return $this;
  198.     }
  199.     public function getVisibleSectionInstitution(): ?bool
  200.     {
  201.         return $this->visible_section_institution;
  202.     }
  203.     public function setVisibleSectionInstitution(?bool $visible_section_institution): self
  204.     {
  205.         $this->visible_section_institution $visible_section_institution;
  206.         return $this;
  207.     }
  208.     public function getVisibleSectionServices(): ?bool
  209.     {
  210.         return $this->visible_section_services;
  211.     }
  212.     public function setVisibleSectionServices(?bool $visible_section_services): self
  213.     {
  214.         $this->visible_section_services $visible_section_services;
  215.         return $this;
  216.     }
  217.     /**
  218.      * @return Collection|PolitiqueDepartementale[]
  219.      */
  220.     public function getVisiblePolitiques(): Collection
  221.     {
  222.         return $this->visible_politiques;
  223.     }
  224.     public function addVisiblePolitique(PolitiqueDepartementale $visiblePolitique): self
  225.     {
  226.         if (!$this->visible_politiques->contains($visiblePolitique)) {
  227.             $this->visible_politiques[] = $visiblePolitique;
  228.         }
  229.         return $this;
  230.     }
  231.     public function removeVisiblePolitique(PolitiqueDepartementale $visiblePolitique): self
  232.     {
  233.         $this->visible_politiques->removeElement($visiblePolitique);
  234.         return $this;
  235.     }
  236.     /**
  237.      * @return Collection|Pages[]
  238.      */
  239.     public function getVisibleInstitutions(): Collection
  240.     {
  241.         return $this->visible_institutions;
  242.     }
  243.     public function addVisibleInstitution(Pages $visibleInstitution): self
  244.     {
  245.         if (!$this->visible_institutions->contains($visibleInstitution)) {
  246.             $this->visible_institutions[] = $visibleInstitution;
  247.         }
  248.         return $this;
  249.     }
  250.     public function removeVisibleInstitution(Pages $visibleInstitution): self
  251.     {
  252.         $this->visible_institutions->removeElement($visibleInstitution);
  253.         return $this;
  254.     }
  255.     /**
  256.      * @return Collection|Service[]
  257.      */
  258.     public function getVisibleServicesEntity(): Collection
  259.     {
  260.         return $this->visible_services_entity;
  261.     }
  262.     public function addVisibleServicesEntity(Service $visibleServicesEntity): self
  263.     {
  264.         if (!$this->visible_services_entity->contains($visibleServicesEntity)) {
  265.             $this->visible_services_entity[] = $visibleServicesEntity;
  266.         }
  267.         return $this;
  268.     }
  269.     public function removeVisibleServicesEntity(Service $visibleServicesEntity): self
  270.     {
  271.         $this->visible_services_entity->removeElement($visibleServicesEntity);
  272.         return $this;
  273.     }
  274.     /**
  275.      * @return Collection|Document[]
  276.      */
  277.     public function getVisibleDocuments(): Collection
  278.     {
  279.         return $this->visible_documents;
  280.     }
  281.     public function addVisibleDocument(Document $visibleDocument): self
  282.     {
  283.         if (!$this->visible_documents->contains($visibleDocument)) {
  284.             $this->visible_documents[] = $visibleDocument;
  285.         }
  286.         return $this;
  287.     }
  288.     public function removeVisibleDocument(Document $visibleDocument): self
  289.     {
  290.         $this->visible_documents->removeElement($visibleDocument);
  291.         return $this;
  292.     }
  293.     public function getVisibleAccueilLenord(): ?bool
  294.     {
  295.         return $this->visible_accueil_lenord;
  296.     }
  297.     public function setVisibleAccueilLenord(?bool $visible_accueil_lenord): self
  298.     {
  299.         $this->visible_accueil_lenord $visible_accueil_lenord;
  300.         return $this;
  301.     }
  302.     public function getVisibleAccueilServices(): ?bool
  303.     {
  304.         return $this->visible_accueil_services;
  305.     }
  306.     public function setVisibleAccueilServices(?bool $visible_accueil_services): self
  307.     {
  308.         $this->visible_accueil_services $visible_accueil_services;
  309.         return $this;
  310.     }
  311.     public function getVisibleEspaceDocumentaire(): ?bool
  312.     {
  313.         return $this->visible_espace_documentaire;
  314.     }
  315.     public function setVisibleEspaceDocumentaire(?bool $visible_espace_documentaire): self
  316.     {
  317.         $this->visible_espace_documentaire $visible_espace_documentaire;
  318.         return $this;
  319.     }
  320.     public function getVisiblePagesLegalesLenord(): ?bool
  321.     {
  322.         return $this->visible_pages_legales_lenord;
  323.     }
  324.     public function setVisiblePagesLegalesLenord(?bool $visible_pages_legales_lenord): self
  325.     {
  326.         $this->visible_pages_legales_lenord $visible_pages_legales_lenord;
  327.         return $this;
  328.     }
  329.     public function getVisiblePagesLegalesServices(): ?bool
  330.     {
  331.         return $this->visible_pages_legales_services;
  332.     }
  333.     public function setVisiblePagesLegalesServices(?bool $visible_pages_legales_services): self
  334.     {
  335.         $this->visible_pages_legales_services $visible_pages_legales_services;
  336.         return $this;
  337.     }
  338.     public function getVisiblePagesLegalesNordinfo(): ?bool
  339.     {
  340.         return $this->visible_pages_legales_nordinfo;
  341.     }
  342.     public function setVisiblePagesLegalesNordinfo(?bool $visible_pages_legales_nordinfo): self
  343.     {
  344.         $this->visible_pages_legales_nordinfo $visible_pages_legales_nordinfo;
  345.         return $this;
  346.     }
  347.     public function getVisibleGlossaireLenord(): ?bool
  348.     {
  349.         return $this->visible_glossaire_lenord;
  350.     }
  351.     public function setVisibleGlossaireLenord(?bool $visible_glossaire_lenord): self
  352.     {
  353.         $this->visible_glossaire_lenord $visible_glossaire_lenord;
  354.         return $this;
  355.     }
  356.     public function getVisibleGlossaireServices(): ?bool
  357.     {
  358.         return $this->visible_glossaire_services;
  359.     }
  360.     public function setVisibleGlossaireServices(?bool $visible_glossaire_services): self
  361.     {
  362.         $this->visible_glossaire_services $visible_glossaire_services;
  363.         return $this;
  364.     }
  365.     public function getVisibleMesinfos(): ?bool
  366.     {
  367.         return $this->visible_mesinfos;
  368.     }
  369.     public function setVisibleMesinfos(?bool $visible_mesinfos): self
  370.     {
  371.         $this->visible_mesinfos $visible_mesinfos;
  372.         return $this;
  373.     }
  374.     public function getVisibleALaUne(): ?bool
  375.     {
  376.         return $this->visible_a_la_une;
  377.     }
  378.     public function setVisibleALaUne(?bool $visible_a_la_une): self
  379.     {
  380.         $this->visible_a_la_une $visible_a_la_une;
  381.         return $this;
  382.     }
  383.     public function getVisibleAgenda(): ?bool
  384.     {
  385.         return $this->visible_agenda;
  386.     }
  387.     public function setVisibleAgenda(?bool $visible_agenda): self
  388.     {
  389.         $this->visible_agenda $visible_agenda;
  390.         return $this;
  391.     }
  392.     public function getVisibleVideos(): ?bool
  393.     {
  394.         return $this->visible_videos;
  395.     }
  396.     public function setVisibleVideos(?bool $visible_videos): self
  397.     {
  398.         $this->visible_videos $visible_videos;
  399.         return $this;
  400.     }
  401.     public function getVisibleNordinfoLedepartement(): ?bool
  402.     {
  403.         return $this->visible_nordinfo_ledepartement;
  404.     }
  405.     public function setVisibleNordinfoLedepartement(?bool $visible_nordinfo_ledepartement): self
  406.     {
  407.         $this->visible_nordinfo_ledepartement $visible_nordinfo_ledepartement;
  408.         return $this;
  409.     }
  410.     public function isVisibleCartographie(): ?bool
  411.     {
  412.         return $this->visible_cartographie;
  413.     }
  414.     public function setVisibleCartographie(?bool $visible_cartographie): self
  415.     {
  416.         $this->visible_cartographie $visible_cartographie;
  417.         return $this;
  418.     }
  419.     /**
  420.      * @return Collection<int, PageSatellite>
  421.      */
  422.     public function getPageSatellites(): Collection
  423.     {
  424.         return $this->pageSatellites;
  425.     }
  426.     public function addPageSatellite(PageSatellite $pageSatellite): self
  427.     {
  428.         if (!$this->pageSatellites->contains($pageSatellite)) {
  429.             $this->pageSatellites->add($pageSatellite);
  430.             $pageSatellite->addEpingle($this);
  431.         }
  432.         return $this;
  433.     }
  434.     public function removePageSatellite(PageSatellite $pageSatellite): self
  435.     {
  436.         if ($this->pageSatellites->removeElement($pageSatellite)) {
  437.             $pageSatellite->removeEpingle($this);
  438.         }
  439.         return $this;
  440.     }
  441. }