interface UserGroupMemberRepositoryInterface (View source)

Persistence for user group membership (user_group_members).

Methods

array
findByGroupId(int $groupId)

Find all members of a group

array
findByUserId(int $userId)

Find all groups a user belongs to

add(int $groupId, int $userId)

Add a user to a group

bool
remove(int $groupId, int $userId)

Remove a user from a group

bool
exists(int $groupId, int $userId)

Check if a user is a member of a group

Details

array findByGroupId(int $groupId)

Find all members of a group

Parameters

int $groupId

Return Value

array

array findByUserId(int $userId)

Find all groups a user belongs to

Parameters

int $userId

Return Value

array

UserGroupMember add(int $groupId, int $userId)

Add a user to a group

Parameters

int $groupId
int $userId

Return Value

UserGroupMember

bool remove(int $groupId, int $userId)

Remove a user from a group

Parameters

int $groupId
int $userId

Return Value

bool

bool exists(int $groupId, int $userId)

Check if a user is a member of a group

Parameters

int $groupId
int $userId

Return Value

bool