src/Entity/PageAccueilService.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PageAccueilServiceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassPageAccueilServiceRepository::class)]
  8. class PageAccueilService implements \Stringable
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private int $id;
  14.     #[ORM\ManyToOne(targetEntityRssArticle::class, inversedBy'pageAccueilServices')]
  15.     private mixed $url_rss_nordinfo;
  16.     #[ORM\ManyToMany(targetEntityService::class, inversedBy'pageAccueilServices')]
  17.     private mixed $services;
  18.     #[ORM\Column(type'text'nullabletrue)]
  19.     private ?string $presentationnull;
  20.     public function __construct()
  21.     {
  22.         $this->services = new ArrayCollection();
  23.     }
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getUrlRssNordinfo(): ?RssArticle
  29.     {
  30.         return $this->url_rss_nordinfo;
  31.     }
  32.     public function setUrlRssNordinfo(?RssArticle $url_rss_nordinfo): self
  33.     {
  34.         $this->url_rss_nordinfo $url_rss_nordinfo;
  35.         return $this;
  36.     }
  37.     /**
  38.      * @return Collection|Service[]
  39.      */
  40.     public function getServices(): Collection
  41.     {
  42.         return $this->services;
  43.     }
  44.     public function addService(Service $service): self
  45.     {
  46.         if (!$this->services->contains($service)) {
  47.             $this->services[] = $service;
  48.         }
  49.         return $this;
  50.     }
  51.     public function removeService(Service $service): self
  52.     {
  53.         $this->services->removeElement($service);
  54.         return $this;
  55.     }
  56.     public function setServices(Collection $services): self
  57.     {
  58.         $this->services $services;
  59.         return $this;
  60.     }
  61.     public function getPresentation(): ?string
  62.     {
  63.         return $this->presentation;
  64.     }
  65.     public function setPresentation(?string $presentation): self
  66.     {
  67.         $this->presentation $presentation;
  68.         return $this;
  69.     }
  70.     public function __toString(): string
  71.     {
  72.         return "Page accueil services";
  73.     }
  74. }