You are here

public function GroupHierarchyManager::getGroupSupergroups in Subgroup (Graph) 1.0.x

Loads the supergroups of a given group.

Parameters

int $group_id: The group for which supergroups will be loaded.

Return value

\Drupal\group\Entity\GroupInterface[] An array of supergroups for the given group.

Overrides GroupHierarchyManagerInterface::getGroupSupergroups

File

src/GroupHierarchyManager.php, line 131

Class

GroupHierarchyManager
Manages the relationship between groups (as subgroups).

Namespace

Drupal\ggroup

Code

public function getGroupSupergroups($group_id) {
  $subgroup_ids = $this
    ->getGroupSupergroupIds($group_id);
  return $this->entityTypeManager
    ->getStorage('group')
    ->loadMultiple($subgroup_ids);
}