Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Provide a method to retrieve the membership IDs of a given group #475

Merged
merged 2 commits into from
Apr 23, 2019

Conversation

pfrenssen
Copy link
Contributor

For many of the methods in MembershipManager that return entity data we offer two versions for convenience: one that returns IDs, and one that returns fully loaded entities. See for example:

  • ::getUserGroups() vs ::getUserGroupIds()
  • ::getGroups() vs ::getGroupIds()

This PR adds a new method ::getGroupMembershipIdsByRoleNames() which is equivalent to ::getGroupMembershipsByRoleNames() but avoids to load the full entity objects.

I am needing this since I am implementing a block that shows the membership count of a group for #472 but it would be wasteful to load the full OgMembership entities just to get a count.

…ered by role name.

This is equivalent to getGroupMembershipIdsByRoleNames() but avoids to load
the full entity objects.
Co-Authored-By: pfrenssen <pieter@frenssen.be>
@pfrenssen pfrenssen merged commit 950190c into 8.x-1.x Apr 23, 2019
@pfrenssen pfrenssen deleted the getGroupMembershipIdsByRoleNames branch April 23, 2019 19:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants