Participants collection - store instances of ParticipantShort instead of Participant

Related to fetch full data of participant of given survey
This commit is contained in:
Meritoo
2017-10-01 20:46:31 +02:00
parent e43712f218
commit f5334f816f
5 changed files with 95 additions and 13 deletions

View File

@@ -164,9 +164,16 @@ class ParticipantService
->run(MethodType::ADD_PARTICIPANTS, $arguments)
->getData();
/* @var Participant $addedParticipant */
$addedParticipant = $participantCollection->getFirst();
$participants = new Collection([
ParticipantShort::fromParticipant($addedParticipant),
]);
$this
->allParticipants
->addParticipants($participantCollection, $surveyId);
->addParticipants($participants, $surveyId);
return $participantCollection->getFirst();
}