<?phpnamespace App\Entity;use App\Repository\ServiceRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ServiceRepository::class)]#[ORM\InheritanceType(value: 'JOINED')]#[ORM\DiscriminatorColumn(name: 'type', type: 'string')]#[ORM\DiscriminatorMap(value: ['InterventionEntrepriseService' => InterventionEntrepriseService::class,'FormationsService' => FormationsService::class, 'ProgrammeFormationService' => ProgrammeFormationService::class, 'OtherService' => OtherService::class])]class Service{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(length: 255)] private ?string $axe = null; #[ORM\Column(type: Types::TEXT, nullable: true)] private ?string $description = null;// #[ORM\Column(type: Types::TEXT)]// private ?string $details = null; #[ORM\OneToMany(mappedBy: 'service', targetEntity: Rubrique::class, orphanRemoval: true)] private Collection $rubriques; public function __construct() { $this->rubriques = new ArrayCollection(); } public function __toString() { return $this->axe; } public function getId(): ?int { return $this->id; } public function getAxe(): ?string { return $this->axe; } public function setAxe(string $axe): self { $this->axe = $axe; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(string $description): self { $this->description = $description; return $this; }// public function getDetails(): ?string// {// return $this->details;// }//// public function setDetails(string $details): self// {// $this->details = $details;//// return $this;// } /** * @return Collection<int, Rubrique> */ public function getRubriques(): Collection { return $this->rubriques; } public function addRubrique(Rubrique $rubrique): self { if (!$this->rubriques->contains($rubrique)) { $this->rubriques->add($rubrique); $rubrique->setService($this); } return $this; } public function removeRubrique(Rubrique $rubrique): self { if ($this->rubriques->removeElement($rubrique)) { // set the owning side to null (unless already changed) if ($rubrique->getService() === $this) { $rubrique->setService(null); } } return $this; }}