You are here

public function GroupMembershipLoaderInterface::loadByGroup in Group 8

Same name and namespace in other branches
  1. 2.0.x src/GroupMembershipLoaderInterface.php \Drupal\group\GroupMembershipLoaderInterface::loadByGroup()

Loads all memberships for a group.

Parameters

\Drupal\group\Entity\GroupInterface $group: The group to load the memberships from.

string|array $roles: (optional) A group role machine name or a list of group role machine names to filter on. Valid results only need to match on one role.

Return value

\Drupal\group\GroupMembership[] The loaded GroupMemberships matching the criteria.

1 method overrides GroupMembershipLoaderInterface::loadByGroup()
GroupMembershipLoader::loadByGroup in src/GroupMembershipLoader.php
Loads all memberships for a group.

File

src/GroupMembershipLoaderInterface.php, line 38

Class

GroupMembershipLoaderInterface
Defines the group membership loader interface.

Namespace

Drupal\group

Code

public function loadByGroup(GroupInterface $group, $roles = NULL);