DbUserGroupRepository
class DbUserGroupRepository implements UserGroupRepositoryInterface (View source)
Methods
Find all groups
Find groups by user ID (groups the user belongs to)
No description
Get the IDs of the groups the user belongs to
Find a group by name
Return the subset of supplied IDs that actually exist in user_groups.
Delete a group by ID
Count all groups
Get member counts for multiple groups in a single query
Count members in a group
Count zones owned by a group
Details
__construct(PDO $db)
No description
array
findAll()
Find all groups
array
findByUserId(int $userId)
Find groups by user ID (groups the user belongs to)
array
findByUserIds(array $userIds)
No description
array
getGroupIdsForUser(int $userId)
Get the IDs of the groups the user belongs to
UserGroup|null
findById(int $id)
Find a group by ID
UserGroup|null
findByName(string $name)
Find a group by name
array
findExistingIds(array $ids)
Return the subset of supplied IDs that actually exist in user_groups.
bool
delete(int $id)
Delete a group by ID
int
countAll()
Count all groups
array
getMemberCountsByGroupIds(array $groupIds)
Get member counts for multiple groups in a single query
int
countMembers(int $groupId)
Count members in a group
int
countZones(int $groupId)
Count zones owned by a group