<?phpnamespace App\Entity;use App\Repository\CitationRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: CitationRepository::class)]class Citation implements \Stringable{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private ?int $id = null; #[ORM\Column(type: 'text', nullable: true)] private ?string $citation= ""; #[ORM\ManyToOne(targetEntity: Contact::class, inversedBy: 'citations')] private mixed $elu; #[ORM\Column(type: 'boolean', nullable: true)] private ?bool $active; #[ORM\ManyToMany(targetEntity: PageAccueil::class, mappedBy: 'citations')] private mixed $pageAccueils; public function __construct() { $this->pageAccueils = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getCitation(): ?string { return $this->citation; } public function setCitation(?string $citation): self { $this->citation = $citation; return $this; } public function getElu(): ?Contact { return $this->elu; } public function setElu(?Contact $elu): self { $this->elu = $elu; return $this; } public function getActive(): ?bool { return $this->active; } public function setActive(?bool $active): self { $this->active = $active; return $this; } /** * @return Collection|PageAccueil[] */ public function getPageAccueils(): Collection { return $this->pageAccueils; } public function addPageAccueil(PageAccueil $pageAccueil): self { if (!$this->pageAccueils->contains($pageAccueil)) { $this->pageAccueils[] = $pageAccueil; $pageAccueil->addCitation($this); } return $this; } public function removePageAccueil(PageAccueil $pageAccueil): self { if ($this->pageAccueils->removeElement($pageAccueil)) { $pageAccueil->removeCitation($this); } return $this; } public function __toString(): string { return (string) $this->citation; }}