You are here

public function GroupTypeManager::isGroup in Organic groups 8

Determines whether an entity type ID and bundle ID are group enabled.

Parameters

string $entity_type_id: The entity type name.

string $bundle: The bundle name.

Return value

bool TRUE if a bundle is a group.

Overrides GroupTypeManagerInterface::isGroup

1 call to GroupTypeManager::isGroup()
GroupTypeManager::addGroup in src/GroupTypeManager.php
Declares a bundle of an entity type as being an OG group.

File

src/GroupTypeManager.php, line 180

Class

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

Namespace

Drupal\og

Code

public function isGroup($entity_type_id, $bundle) {
  $group_map = $this
    ->getGroupMap();
  return isset($group_map[$entity_type_id]) && in_array($bundle, $group_map[$entity_type_id]);
}