public static function GroupContentType::loadByContentPluginId in Group 2.0.x
Same name and namespace in other branches
- 8 src/Entity/GroupContentType.php \Drupal\group\Entity\GroupContentType::loadByContentPluginId()
Loads group content type entities by their responsible plugin ID.
Parameters
string|string[] $plugin_id: The ID of the group relation 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 type entities indexed by their IDs.
Overrides GroupContentTypeInterface::loadByContentPluginId
1 call to GroupContentType::loadByContentPluginId()
- GroupContentUninstallValidator::hasGroupContent in src/
UninstallValidator/ GroupContentUninstallValidator.php - Determines if there is any group content for a group relation plugin.
File
- src/
Entity/ GroupContentType.php, line 183
Class
- GroupContentType
- Defines the Group content type configuration entity.
Namespace
Drupal\group\EntityCode
public static function loadByContentPluginId($plugin_id) {
/** @var \Drupal\group\Entity\Storage\GroupContentTypeStorageInterface $storage */
$storage = \Drupal::entityTypeManager()
->getStorage('group_content_type');
return $storage
->loadByContentPluginId($plugin_id);
}