private function create(Round $round) { $activity = new Activity(); $activity->setRound($round); $activity->setPlayer($this->currentUser); $activity->setStartDate(new \DateTime()); $this->em->persist($activity); $this->em->flush(); return $activity; }