You are here

public function GroupRoleStorage::loadSynchronizedByUserRoles in Group 2.0.x

Same name and namespace in other branches
  1. 8 src/Entity/Storage/GroupRoleStorage.php \Drupal\group\Entity\Storage\GroupRoleStorage::loadSynchronizedByUserRoles()

Retrieves all synchronized GroupRole entities by user roles.

Parameters

string[] $role_ids: The list of user role IDs to load the synchronized group roles for.

Return value

\Drupal\group\Entity\GroupRoleInterface[] The group roles matching the user roles.

Overrides GroupRoleStorageInterface::loadSynchronizedByUserRoles

File

src/Entity/Storage/GroupRoleStorage.php, line 150

Class

GroupRoleStorage
Defines the storage handler class for group role entities.

Namespace

Drupal\group\Entity\Storage

Code

public function loadSynchronizedByUserRoles(array $role_ids) {
  return $this
    ->loadMultiple($this->groupRoleSynchronizer
    ->getGroupRoleIdsByUserRoles($role_ids));
}