/** * Removes a Project Attachment * * @param ProjectAttachment $projectAttachment An attachment to remove */ public function removeAttachment($projectAttachment) { $projectAttachment->setProject(null); $this->attachments->removeElement($projectAttachment); }
/** * Removes a Project Attachment. * * @param ProjectAttachment $projectAttachment An attachment to remove */ public function removeAttachment($projectAttachment) { if ($projectAttachment instanceof ProjectAttachment) { $projectAttachment->setProject(null); } $this->attachments->removeElement($projectAttachment); }