MAPG-235 highscores added to the end of challenge

This commit is contained in:
balazs committed 2021-05-22 11:34:55 +02:00
1 parent 599d8bf153
commit b00fe4ebe3
6 files changed
+150 -10

No files matched your search

@@ -32,6 +32,14 @@ class UserInChallengeRepository
yield from $this->pdm->selectMultipleFromDb($select, UserInChallenge::class);
}
public function getAllByChallengeWithUsers(Challenge $challenge) : Generator
{
$select = new Select(\Container::$dbConnection);
$select->where('challenge_id', '=', $challenge->getId());
yield from $this->pdm->selectMultipleFromDb($select, UserInChallenge::class, true, [User::class]);
}
public function getByUserIdAndChallenge(int $userId, Challenge $challenge): ?UserInChallenge
{
$select = new Select(\Container::$dbConnection);