You are here

public static function Og::isGroupContent in Organic groups 8

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

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 content.

7 calls to Og::isGroupContent()
BundleFormAlter::addGroupContent in og_ui/src/BundleFormAlter.php
Adds the "is group content?" checkbox and target settings elements.
GroupAudienceTest::testGetAllGroupAudienceFields in tests/src/Kernel/Entity/GroupAudienceTest.php
Testing getting all group audience fields.
og_entity_access in ./og.module
Implements hook_entity_access().
og_entity_create_access in ./og.module
Implements hook_entity_create_access().
og_entity_delete in ./og.module
Implements hook_entity_delete().

... See full list

File

src/Og.php, line 273

Class

Og
A static helper class for OG.

Namespace

Drupal\og

Code

public static function isGroupContent($entity_type_id, $bundle_id) {
  return \Drupal::service('og.group_type_manager')
    ->isGroupContent($entity_type_id, $bundle_id);
}