diff options
author | Joas Schilling <coding@schilljs.com> | 2021-03-05 14:37:12 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-03-08 13:56:21 +0300 |
commit | 928e047de2dca944ba2d1747bd1e3a83e57e746c (patch) | |
tree | b5d23aa1d49e78f51a983836448223643d98c4b7 /lib/Model | |
parent | 1dd9297864a925f36db88bd3bfd59af41a1e2f3d (diff) |
Handle all getParticipants with multi sessions
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/SessionMapper.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Model/SessionMapper.php b/lib/Model/SessionMapper.php index d623ff335..afa88109b 100644 --- a/lib/Model/SessionMapper.php +++ b/lib/Model/SessionMapper.php @@ -55,6 +55,19 @@ class SessionMapper extends QBMapper { /** * @param int $attendeeId + * @return Session[] + */ + public function findByAttendeeId(int $attendeeId): array { + $query = $this->db->getQueryBuilder(); + $query->select('*') + ->from($this->getTableName()) + ->where($query->expr()->eq('attendee_id', $query->createNamedParameter($attendeeId))); + + return $this->findEntities($query); + } + + /** + * @param int $attendeeId * @return int Number of deleted entities */ public function deleteByAttendeeId(int $attendeeId): int { |