public function removeSubjects(Subject $subject) { if ($this->subjects->contains($subject)) { $this->subjects->removeElement($subject); } }