public static function GroupContent::loadByContentPluginId in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/GroupContent.php \Drupal\group\Entity\GroupContent::loadByContentPluginId()
Loads group content entities by their responsible plugin ID.
Parameters
string $plugin_id: The ID of the content enabler plugin.
Return value
\Drupal\group\Entity\GroupContentInterface[] An array of group content entities indexed by their IDs.
Overrides GroupContentInterface::loadByContentPluginId
File
- src/Entity/ GroupContent.php, line 113 
Class
- GroupContent
- Defines the Group content entity.
Namespace
Drupal\group\EntityCode
public static function loadByContentPluginId($plugin_id) {
  /** @var \Drupal\group\Entity\Storage\GroupContentStorageInterface $storage */
  $storage = \Drupal::entityTypeManager()
    ->getStorage('group_content');
  return $storage
    ->loadByContentPluginId($plugin_id);
}