/** * * @param \Amisure\P4SApiBundle\Entity\User\SessionUser $participant * @return \Amisure\P4SApiBundle\Entity\Event */ public function addParticipant(SessionUser $participant) { if (!$this->participants->contains($participant)) { $this->participants->add($participant); // $participant->addEvent($this); } return $this; }