You are here

public static function GroupContentType::loadByEntityTypeId in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/GroupContentType.php \Drupal\group\Entity\GroupContentType::loadByEntityTypeId()

Loads group content type entities which could serve a given entity type.

Parameters

string $entity_type_id: An entity type ID which may be served by one or more group content types.

Return value

\Drupal\group\Entity\GroupContentTypeInterface[] An array of group content type entities which serve the given entity.

Overrides GroupContentTypeInterface::loadByEntityTypeId

1 call to GroupContentType::loadByEntityTypeId()
GroupContentToEntityBase::getGroupContentTypeIds in src/Plugin/views/relationship/GroupContentToEntityBase.php
Returns the group content types this relationship should filter on.

File

src/Entity/GroupContentType.php, line 192

Class

GroupContentType
Defines the Group content type configuration entity.

Namespace

Drupal\group\Entity

Code

public static function loadByEntityTypeId($entity_type_id) {

  /** @var \Drupal\group\Entity\Storage\GroupContentTypeStorageInterface $storage */
  $storage = \Drupal::entityTypeManager()
    ->getStorage('group_content_type');
  return $storage
    ->loadByEntityTypeId($entity_type_id);
}