You are here

public function GroupTypeManager::getGroupBundleIdsByEntityType in Organic groups 8

Returns the group of an entity type.

Parameters

string $entity_type_id: The entity type name.

Return value

\Drupal\Core\Entity\EntityInterface[] Array of groups, or an empty array if none found

Overrides GroupTypeManagerInterface::getGroupBundleIdsByEntityType

File

src/GroupTypeManager.php, line 195

Class

GroupTypeManager
A manager to keep track of which entity type/bundles are OG group enabled.

Namespace

Drupal\og

Code

public function getGroupBundleIdsByEntityType($entity_type_id) {
  $group_map = $this
    ->getGroupMap();
  return isset($group_map[$entity_type_id]) ? $group_map[$entity_type_id] : [];
}