You are here

public function OgGroupAudienceHelper::hasGroupAudienceField in Organic groups 8

Returns whether the given entity bundle has a group audience field.

This can be used to determine whether the bundle is group content.

Parameters

string $entity_type_id: The entity type ID to check for the presence of group audience fields.

string $bundle_id: The bundle name to check for the presence of group audience fields.

Return value

bool TRUE if the field is a group audience type, FALSE otherwise.

Overrides OgGroupAudienceHelperInterface::hasGroupAudienceField

File

src/OgGroupAudienceHelper.php, line 47

Class

OgGroupAudienceHelper
OG audience field helper methods.

Namespace

Drupal\og

Code

public function hasGroupAudienceField($entity_type_id, $bundle_id) {
  return (bool) $this
    ->getAllGroupAudienceFields($entity_type_id, $bundle_id);
}