*/ #[ORM\ManyToMany(targetEntity: File::class)] private Collection $files; public function __construct() { $this->files = new ArrayCollection(); } public function getId(): ?Uuid { return $this->id; } /** * @return Collection */ public function getFile(): Collection { return $this->files; } public function addFile(File $file): static { if (!$this->files->contains($file)) { $this->files->add($file); } return $this; } public function removeFile(File $file): static { $this->files->removeElement($file); return $this; } }