public function GroupHierarchyManager::getGroupSubgroups in Subgroup (Graph) 1.0.x
Loads the subgroups of a given group.
Parameters
int $group_id: The group for which subgroups will be loaded.
Return value
\Drupal\group\Entity\GroupInterface[] An array of subgroups for the given group.
Overrides GroupHierarchyManagerInterface::getGroupSubgroups
File
- src/
GroupHierarchyManager.php, line 116
Class
- GroupHierarchyManager
- Manages the relationship between groups (as subgroups).
Namespace
Drupal\ggroupCode
public function getGroupSubgroups($group_id) {
$subgroup_ids = $this
->getGroupSubgroupIds($group_id);
return $this->entityTypeManager
->getStorage('group')
->loadMultiple($subgroup_ids);
}