public function removeImage(ImageInterface $image) { if ($this->hasImage($image)) { $image->setOwner(null); $this->images->removeElement($image); } }