public function removeAttachment(FootprintAttachment $attachment) { $attachment->setFootprint(null); $this->attachments->removeElement($attachment); }