<?phpnamespace App\Entity;use App\Repository\ServiceGrandProfilRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ServiceGrandProfilRepository::class)]class ServiceGrandProfil 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\OneToMany(targetEntity: ServiceSousProfil::class, mappedBy: 'grandprofil')] private mixed $serviceSousProfils; #[ORM\ManyToMany(targetEntity: Service::class, mappedBy: 'grandprofils')] private mixed $services; #[ORM\ManyToMany(targetEntity: ServiceFocusPub::class, mappedBy: 'grandprofils')] private mixed $serviceFocusPubs; #[ORM\Column(type: 'string', length: 255, nullable: true)] private ?string $alias_url= null; public function __construct() { $this->serviceSousProfils = new ArrayCollection(); $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; } /** * @return Collection|ServiceSousProfil[] */ public function getServiceSousProfils(): Collection { return $this->serviceSousProfils; } public function addServiceSousProfil(ServiceSousProfil $serviceSousProfil): self { if (!$this->serviceSousProfils->contains($serviceSousProfil)) { $this->serviceSousProfils[] = $serviceSousProfil; $serviceSousProfil->setGrandprofil($this); } return $this; } public function removeServiceSousProfil(ServiceSousProfil $serviceSousProfil): self { if ($this->serviceSousProfils->removeElement($serviceSousProfil)) { // set the owning side to null (unless already changed) if ($serviceSousProfil->getGrandprofil() === $this) { $serviceSousProfil->setGrandprofil(null); } } 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->addGrandprofil($this); } return $this; } public function removeService(Service $service): self { if ($this->services->removeElement($service)) { $service->removeGrandprofil($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->addGrandprofil($this); } return $this; } public function removeServiceFocusPub(ServiceFocusPub $serviceFocusPub): self { if ($this->serviceFocusPubs->removeElement($serviceFocusPub)) { $serviceFocusPub->removeGrandprofil($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; }}