gallery = new ArrayCollection(); } public function __toString() { return $this->title; } public function getId(): ?int { return $this->id; } public function getImage(): ?File { return $this->image; } public function setImage(?File $image): self { $this->image = $image; return $this; } /** * @return Collection|File[] */ public function getGallery(): Collection { return $this->gallery; } public function addGallery(File $gallery): self { if (!$this->gallery->contains($gallery)) { $this->gallery[] = $gallery; } return $this; } public function removeGallery(File $gallery): self { $this->gallery->removeElement($gallery); return $this; } public function getFile(): ?File { return $this->file; } public function setFile(?File $file): self { $this->file = $file; return $this; } }