<?phpnamespace App\Entity;use App\Repository\ServiceSousProfilRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ServiceSousProfilRepository::class)]class ServiceSousProfil implements \Stringable{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private ?int $id = null; #[ORM\Column(type: 'string', length: 255, nullable: true)] private ?string $titre= null; #[ORM\ManyToOne(targetEntity: ServiceGrandProfil::class, inversedBy: 'serviceSousProfils')] private mixed $grandprofil; #[ORM\ManyToMany(targetEntity: Service::class, mappedBy: 'sousprofils')] private mixed $services; #[ORM\ManyToMany(targetEntity: ServiceFocusPub::class, mappedBy: 'sousprofils')] private mixed $serviceFocusPubs; #[ORM\Column(type: 'string', length: 255, nullable: true)] private ?string $alias_url= null; public function __construct() { $this->services = new ArrayCollection(); $this->serviceFocusPubs = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getTitre(): ?string { return $this->titre; } public function setTitre(?string $titre): self { $this->titre = $titre; return $this; } public function getGrandprofil(): ?ServiceGrandProfil { return $this->grandprofil; } public function setGrandprofil(?ServiceGrandProfil $grandprofil): self { $this->grandprofil = $grandprofil; return $this; } /** * @return Collection|Service[] */ public function getServices(): Collection { return $this->services; } public function addService(Service $service): self { if (!$this->services->contains($service)) { $this->services[] = $service; $service->addSousprofil($this); } return $this; } public function removeService(Service $service): self { if ($this->services->removeElement($service)) { $service->removeSousprofil($this); } return $this; } /** * @return Collection|ServiceFocusPub[] */ public function getServiceFocusPubs(): Collection { return $this->serviceFocusPubs; } public function addServiceFocusPub(ServiceFocusPub $serviceFocusPub): self { if (!$this->serviceFocusPubs->contains($serviceFocusPub)) { $this->serviceFocusPubs[] = $serviceFocusPub; $serviceFocusPub->addSousprofil($this); } return $this; } public function removeServiceFocusPub(ServiceFocusPub $serviceFocusPub): self { if ($this->serviceFocusPubs->removeElement($serviceFocusPub)) { $serviceFocusPub->removeSousprofil($this); } return $this; } public function __toString(): string { return (string) $this->titre; } public function getAliasUrl(): ?string { return $this->alias_url; } public function setAliasUrl(?string $alias_url): self { $this->alias_url = $alias_url; return $this; }}