src/Entity/Service.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ServiceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassServiceRepository::class)]
  8. class Service 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'string'length255nullabletrue)]
  17.     private ?string $image_namenull;
  18.     #[ORM\Column(type'string'length255nullabletrue)]
  19.     private ?string $image_urlnull;
  20.     #[ORM\ManyToMany(targetEntityServiceGrandProfil::class, inversedBy'services')]
  21.     private mixed $grandprofils;
  22.     #[ORM\ManyToMany(targetEntityServiceSousProfil::class, inversedBy'services')]
  23.     private mixed $sousprofils;
  24.     #[ORM\ManyToMany(targetEntityServiceTheme::class, inversedBy'services')]
  25.     private mixed $themes;
  26.     #[ORM\Column(type'text'nullabletrue)]
  27.     private ?string $chaponull;
  28.     #[ORM\Column(type'string'length255nullabletrue)]
  29.     private ?string $urlnull;
  30.     #[ORM\ManyToMany(targetEntityPolitiqueDepartementale::class, mappedBy'services')]
  31.     private mixed $politiqueDepartementales;
  32.     #[ORM\Column(type'text'nullabletrue)]
  33.     private ?string $contentnull;
  34.     #[ORM\Column(type'integer'nullabletrue)]
  35.     private ?int $nombre_visite;
  36.     #[ORM\Column(type'integer'nullabletrue)]
  37.     private ?int $avis_positif;
  38.     #[ORM\Column(type'integer'nullabletrue)]
  39.     private ?int $avis_negatif;
  40.     #[ORM\ManyToOne(targetEntityStatut::class, inversedBy'services')]
  41.     private mixed $statut;
  42.     #[ORM\Column(type'datetime'nullabletrue)]
  43.     private $date_update;
  44.     #[ORM\Column(type'string'length255nullabletrue)]
  45.     private ?string $alias_urlnull;
  46.     #[ORM\ManyToMany(targetEntityPageAccueilService::class, mappedBy'services')]
  47.     private mixed $pageAccueilServices;
  48.     #[ORM\ManyToMany(targetEntityEpingle::class, mappedBy'visible_services_entity')]
  49.     private mixed $epingles;
  50.     #[ORM\Column(type'integer'nullabletrue)]
  51.     private ?int $order_service;
  52.     #[ORM\Column(type'integer'nullabletrue)]
  53.     private ?int $view_count;
  54.     #[ORM\OneToMany(targetEntityServiceFeedback::class, mappedBy'service')]
  55.     private mixed $serviceFeedback;
  56.     #[ORM\ManyToMany(targetEntityPageSatellite::class, mappedBy'services')]
  57.     private Collection $pageSatellites;
  58.     public function __construct()
  59.     {
  60.         $this->grandprofils = new ArrayCollection();
  61.         $this->sousprofils = new ArrayCollection();
  62.         $this->themes = new ArrayCollection();
  63.         $this->politiqueDepartementales = new ArrayCollection();
  64.         $this->pageAccueilServices = new ArrayCollection();
  65.         $this->epingles = new ArrayCollection();
  66.         $this->serviceFeedback = new ArrayCollection();
  67.         $this->pageSatellites = new ArrayCollection();
  68.     }
  69.     public function getId(): ?int
  70.     {
  71.         return $this->id;
  72.     }
  73.     public function getTitre(): ?string
  74.     {
  75.         return $this->titre;
  76.     }
  77.     public function setTitre(?string $titre): self
  78.     {
  79.         $this->titre $titre;
  80.         return $this;
  81.     }
  82.     public function getImageName(): ?string
  83.     {
  84.         return $this->image_name;
  85.     }
  86.     public function setImageName(?string $image_name): self
  87.     {
  88.         $this->image_name $image_name;
  89.         return $this;
  90.     }
  91.     public function getImageUrl(): ?string
  92.     {
  93.         return $this->image_url;
  94.     }
  95.     public function setImageUrl(?string $image_url): self
  96.     {
  97.         $this->image_url $image_url;
  98.         return $this;
  99.     }
  100.     /**
  101.      * @return Collection|ServiceGrandProfil[]
  102.      */
  103.     public function getGrandprofils(): Collection
  104.     {
  105.         return $this->grandprofils;
  106.     }
  107.     public function addGrandprofil(ServiceGrandProfil $grandprofil): self
  108.     {
  109.         if (!$this->grandprofils->contains($grandprofil)) {
  110.             $this->grandprofils[] = $grandprofil;
  111.         }
  112.         return $this;
  113.     }
  114.     public function removeGrandprofil(ServiceGrandProfil $grandprofil): self
  115.     {
  116.         $this->grandprofils->removeElement($grandprofil);
  117.         return $this;
  118.     }
  119.     /**
  120.      * @return Collection|ServiceSousProfil[]
  121.      */
  122.     public function getSousprofils(): Collection
  123.     {
  124.         return $this->sousprofils;
  125.     }
  126.     public function addSousprofil(ServiceSousProfil $sousprofil): self
  127.     {
  128.         if (!$this->sousprofils->contains($sousprofil)) {
  129.             $this->sousprofils[] = $sousprofil;
  130.         }
  131.         return $this;
  132.     }
  133.     public function removeSousprofil(ServiceSousProfil $sousprofil): self
  134.     {
  135.         $this->sousprofils->removeElement($sousprofil);
  136.         return $this;
  137.     }
  138.     /**
  139.      * @return Collection|ServiceTheme[]
  140.      */
  141.     public function getThemes(): Collection
  142.     {
  143.         return $this->themes;
  144.     }
  145.     public function addTheme(ServiceTheme $theme): self
  146.     {
  147.         if (!$this->themes->contains($theme)) {
  148.             $this->themes[] = $theme;
  149.         }
  150.         return $this;
  151.     }
  152.     public function removeTheme(ServiceTheme $theme): self
  153.     {
  154.         $this->themes->removeElement($theme);
  155.         return $this;
  156.     }
  157.     public function getChapo(): ?string
  158.     {
  159.         return $this->chapo;
  160.     }
  161.     public function setChapo(?string $chapo): self
  162.     {
  163.         $this->chapo $chapo;
  164.         return $this;
  165.     }
  166.     public function getUrl(): ?string
  167.     {
  168.         return $this->url;
  169.     }
  170.     public function setUrl(?string $url): self
  171.     {
  172.         $this->url $url;
  173.         return $this;
  174.     }
  175.     /**
  176.      * @return Collection|PolitiqueDepartementale[]
  177.      */
  178.     public function getPolitiqueDepartementales(): Collection
  179.     {
  180.         return $this->politiqueDepartementales;
  181.     }
  182.     public function addPolitiqueDepartementale(PolitiqueDepartementale $politiqueDepartementale): self
  183.     {
  184.         if (!$this->politiqueDepartementales->contains($politiqueDepartementale)) {
  185.             $this->politiqueDepartementales[] = $politiqueDepartementale;
  186.             $politiqueDepartementale->addService($this);
  187.         }
  188.         return $this;
  189.     }
  190.     public function removePolitiqueDepartementale(PolitiqueDepartementale $politiqueDepartementale): self
  191.     {
  192.         if ($this->politiqueDepartementales->removeElement($politiqueDepartementale)) {
  193.             $politiqueDepartementale->removeService($this);
  194.         }
  195.         return $this;
  196.     }
  197.     public function getContent(): ?string
  198.     {
  199.         return $this->content;
  200.     }
  201.     public function setContent(?string $content): self
  202.     {
  203.         $this->content $content;
  204.         return $this;
  205.     }
  206.     public function getNombreVisite(): ?int
  207.     {
  208.         return $this->nombre_visite;
  209.     }
  210.     public function setNombreVisite(?int $nombre_visite): self
  211.     {
  212.         $this->nombre_visite $nombre_visite;
  213.         return $this;
  214.     }
  215.     public function getAvisPositif(): ?int
  216.     {
  217.         return $this->avis_positif;
  218.     }
  219.     public function setAvisPositif(?int $avis_positif): self
  220.     {
  221.         $this->avis_positif $avis_positif;
  222.         return $this;
  223.     }
  224.     public function getAvisNegatif(): ?int
  225.     {
  226.         return $this->avis_negatif;
  227.     }
  228.     public function setAvisNegatif(?int $avis_negatif): self
  229.     {
  230.         $this->avis_negatif $avis_negatif;
  231.         return $this;
  232.     }
  233.     public function __toString(): string
  234.     {
  235.         return (string) $this->titre;
  236.     }
  237.     public function getStatut(): ?Statut
  238.     {
  239.         return $this->statut;
  240.     }
  241.     public function setStatut(?Statut $statut): self
  242.     {
  243.         $this->statut $statut;
  244.         return $this;
  245.     }
  246.     public function getDateUpdate(): ?\DateTimeInterface
  247.     {
  248.         return $this->date_update;
  249.     }
  250.     public function setDateUpdate(?\DateTimeInterface $date_update): self
  251.     {
  252.         $this->date_update $date_update;
  253.         return $this;
  254.     }
  255.     public function getAliasUrl(): ?string
  256.     {
  257.         return $this->alias_url;
  258.     }
  259.     public function setAliasUrl(?string $alias_url): self
  260.     {
  261.         $this->alias_url $alias_url;
  262.         return $this;
  263.     }
  264.     /**
  265.      * @return Collection|PageAccueilService[]
  266.      */
  267.     public function getPageAccueilServices(): Collection
  268.     {
  269.         return $this->pageAccueilServices;
  270.     }
  271.     public function addPageAccueilService(PageAccueilService $pageAccueilService): self
  272.     {
  273.         if (!$this->pageAccueilServices->contains($pageAccueilService)) {
  274.             $this->pageAccueilServices[] = $pageAccueilService;
  275.             $pageAccueilService->addService($this);
  276.         }
  277.         return $this;
  278.     }
  279.     public function removePageAccueilService(PageAccueilService $pageAccueilService): self
  280.     {
  281.         if ($this->pageAccueilServices->removeElement($pageAccueilService)) {
  282.             $pageAccueilService->removeService($this);
  283.         }
  284.         return $this;
  285.     }
  286.     /**
  287.      * @return Collection|Epingle[]
  288.      */
  289.     public function getEpingles(): Collection
  290.     {
  291.         return $this->epingles;
  292.     }
  293.     public function addEpingle(Epingle $epingle): self
  294.     {
  295.         if (!$this->epingles->contains($epingle)) {
  296.             $this->epingles[] = $epingle;
  297.             $epingle->addVisibleServicesEntity($this);
  298.         }
  299.         return $this;
  300.     }
  301.     public function removeEpingle(Epingle $epingle): self
  302.     {
  303.         if ($this->epingles->removeElement($epingle)) {
  304.             $epingle->removeVisibleServicesEntity($this);
  305.         }
  306.         return $this;
  307.     }
  308.     public function getOrderService(): ?int
  309.     {
  310.         return $this->order_service;
  311.     }
  312.     public function setOrderService(?int $order_service): self
  313.     {
  314.         $this->order_service $order_service;
  315.         return $this;
  316.     }
  317.     public function getViewCount(): ?int
  318.     {
  319.         return $this->view_count;
  320.     }
  321.     public function setViewCount(?int $view_count): self
  322.     {
  323.         $this->view_count $view_count;
  324.         return $this;
  325.     }
  326.     /**
  327.      * @return Collection<int, ServiceFeedback>
  328.      */
  329.     public function getServiceFeedback(): Collection
  330.     {
  331.         return $this->serviceFeedback;
  332.     }
  333.     public function addServiceFeedback(ServiceFeedback $serviceFeedback): self
  334.     {
  335.         if (!$this->serviceFeedback->contains($serviceFeedback)) {
  336.             $this->serviceFeedback[] = $serviceFeedback;
  337.             $serviceFeedback->setService($this);
  338.         }
  339.         return $this;
  340.     }
  341.     public function removeServiceFeedback(ServiceFeedback $serviceFeedback): self
  342.     {
  343.         if ($this->serviceFeedback->removeElement($serviceFeedback)) {
  344.             // set the owning side to null (unless already changed)
  345.             if ($serviceFeedback->getService() === $this) {
  346.                 $serviceFeedback->setService(null);
  347.             }
  348.         }
  349.         return $this;
  350.     }
  351.     /**
  352.      * @return Collection<int, PageSatellite>
  353.      */
  354.     public function getPageSatellites(): Collection
  355.     {
  356.         return $this->pageSatellites;
  357.     }
  358.     public function addPageSatellite(PageSatellite $pageSatellite): self
  359.     {
  360.         if (!$this->pageSatellites->contains($pageSatellite)) {
  361.             $this->pageSatellites->add($pageSatellite);
  362.             $pageSatellite->addService($this);
  363.         }
  364.         return $this;
  365.     }
  366.     public function removePageSatellite(PageSatellite $pageSatellite): self
  367.     {
  368.         if ($this->pageSatellites->removeElement($pageSatellite)) {
  369.             $pageSatellite->removeService($this);
  370.         }
  371.         return $this;
  372.     }
  373. }