public function removePart($projectPart) { $projectPart->setProject(null); $this->parts->removeElement($projectPart); }