src/Entity/ServiceTheme.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ServiceThemeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassServiceThemeRepository::class)]
  8. class ServiceTheme 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 $pictogramme_vertnull;
  18.     #[ORM\Column(type'string'length255nullabletrue)]
  19.     private ?string $pictogramme_bleunull;
  20.     #[ORM\ManyToMany(targetEntityService::class, mappedBy'themes')]
  21.     private mixed $services;
  22.     #[ORM\ManyToMany(targetEntityServiceFocusPub::class, mappedBy'themes')]
  23.     private mixed $serviceFocusPubs;
  24.     #[ORM\Column(type'string'length255nullabletrue)]
  25.     private ?string $alias_urlnull;
  26.     public function __construct()
  27.     {
  28.         $this->services = new ArrayCollection();
  29.         $this->serviceFocusPubs = new ArrayCollection();
  30.     }
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getTitre(): ?string
  36.     {
  37.         return $this->titre;
  38.     }
  39.     public function setTitre(?string $titre): self
  40.     {
  41.         $this->titre $titre;
  42.         return $this;
  43.     }
  44.     public function getPictogrammeVert(): ?string
  45.     {
  46.         return $this->pictogramme_vert;
  47.     }
  48.     public function setPictogrammeVert(?string $pictogramme_vert): self
  49.     {
  50.         $this->pictogramme_vert $pictogramme_vert;
  51.         return $this;
  52.     }
  53.     public function getPictogrammeBleu(): ?string
  54.     {
  55.         return $this->pictogramme_bleu;
  56.     }
  57.     public function setPictogrammeBleu(?string $pictogramme_bleu): self
  58.     {
  59.         $this->pictogramme_bleu $pictogramme_bleu;
  60.         return $this;
  61.     }
  62.     /**
  63.      * @return Collection|Service[]
  64.      */
  65.     public function getServices(): Collection
  66.     {
  67.         return $this->services;
  68.     }
  69.     public function addService(Service $service): self
  70.     {
  71.         if (!$this->services->contains($service)) {
  72.             $this->services[] = $service;
  73.             $service->addTheme($this);
  74.         }
  75.         return $this;
  76.     }
  77.     public function removeService(Service $service): self
  78.     {
  79.         if ($this->services->removeElement($service)) {
  80.             $service->removeTheme($this);
  81.         }
  82.         return $this;
  83.     }
  84.     /**
  85.      * @return Collection|ServiceFocusPub[]
  86.      */
  87.     public function getServiceFocusPubs(): Collection
  88.     {
  89.         return $this->serviceFocusPubs;
  90.     }
  91.     public function addServiceFocusPub(ServiceFocusPub $serviceFocusPub): self
  92.     {
  93.         if (!$this->serviceFocusPubs->contains($serviceFocusPub)) {
  94.             $this->serviceFocusPubs[] = $serviceFocusPub;
  95.             $serviceFocusPub->addTheme($this);
  96.         }
  97.         return $this;
  98.     }
  99.     public function removeServiceFocusPub(ServiceFocusPub $serviceFocusPub): self
  100.     {
  101.         if ($this->serviceFocusPubs->removeElement($serviceFocusPub)) {
  102.             $serviceFocusPub->removeTheme($this);
  103.         }
  104.         return $this;
  105.     }
  106.     public function __toString(): string
  107.     {
  108.         return (string) $this->titre;
  109.     }
  110.     public function getAliasUrl(): ?string
  111.     {
  112.         return $this->alias_url;
  113.     }
  114.     public function setAliasUrl(?string $alias_url): self
  115.     {
  116.         $this->alias_url $alias_url;
  117.         return $this;
  118.     }
  119. }