You are here

public function GroupContentTypeStorage::loadByContentPluginId in Group 8

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

Retrieves group content types by their responsible plugin ID.

Parameters

string|string[] $plugin_id: The ID of the content enabler plugin or an array of plugin IDs. If more than one plugin ID is provided, this will load all of the group content types that match any of the provided plugin IDs.

Return value

\Drupal\group\Entity\GroupContentTypeInterface[] An array of group content types indexed by their IDs.

Overrides GroupContentTypeStorageInterface::loadByContentPluginId

1 call to GroupContentTypeStorage::loadByContentPluginId()
GroupContentTypeStorage::loadByEntityTypeId in src/Entity/Storage/GroupContentTypeStorage.php
Retrieves group content types which could serve a given entity type.

File

src/Entity/Storage/GroupContentTypeStorage.php, line 82

Class

GroupContentTypeStorage
Defines the storage handler class for group content type entities.

Namespace

Drupal\group\Entity\Storage

Code

public function loadByContentPluginId($plugin_id) {
  return $this
    ->loadByProperties([
    'content_plugin' => $plugin_id,
  ]);
}