You are here

public static function Og::isGroup in Organic groups 8

Check if the given entity type and bundle is a group.

Parameters

string $entity_type_id: The entity type.

string $bundle_id: The bundle name.

Return value

bool True or false if the given entity is group.

11 calls to Og::isGroup()
BundleFormAlter::addGroupType in og_ui/src/BundleFormAlter.php
Adds the "is group?" checkbox.
GroupCheck::access in src/Access/GroupCheck.php
Checks if the user has group related permissions.
OgMembership::preSave in src/Entity/OgMembership.php
Acts on an entity before the presave hook is invoked.
og_entity_access in ./og.module
Implements hook_entity_access().
og_entity_bundle_field_info in ./og.module
Implements hook_entity_bundle_field_info().

... See full list

File

src/Og.php, line 258

Class

Og
A static helper class for OG.

Namespace

Drupal\og

Code

public static function isGroup($entity_type_id, $bundle_id) {
  return static::groupTypeManager()
    ->isGroup($entity_type_id, $bundle_id);
}