<?phpnamespace App\Entity;use App\Repository\SavoirTechnologiqueRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: SavoirTechnologiqueRepository::class)]class SavoirTechnologique{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $libelle = null; #[ORM\ManyToMany(targetEntity: Competence::class, inversedBy: 'refSavoirTechnologiques')] private Collection $refCompetences; #[ORM\ManyToMany(targetEntity: Sequence::class, mappedBy: 'refSavoirTechnologique')] private Collection $refSequences; public function __construct() { $this->refCompetences = new ArrayCollection(); $this->refSequences = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getLibelle(): ?string { return $this->libelle; } public function setLibelle(string $libelle): self { $this->libelle = $libelle; return $this; } /** * @return Collection<int, Competence> */ public function getRefCompetences(): Collection { return $this->refCompetences; } public function addRefCompetence(Competence $refCompetence): self { if (!$this->refCompetences->contains($refCompetence)) { $this->refCompetences->add($refCompetence); } return $this; } public function removeRefCompetence(Competence $refCompetence): self { $this->refCompetences->removeElement($refCompetence); return $this; } public function __toString(): string { return $this->getLibelle();// TODO: Implement __toString() method. } /** * @return Collection<int, Sequence> */ public function getRefSequences(): Collection { return $this->refSequences; } public function addRefSequence(Sequence $refSequence): self { if (!$this->refSequences->contains($refSequence)) { $this->refSequences->add($refSequence); $refSequence->addRefSavoirTechnologique($this); } return $this; } public function removeRefSequence(Sequence $refSequence): self { if ($this->refSequences->removeElement($refSequence)) { $refSequence->removeRefSavoirTechnologique($this); } return $this; }}