public function GroupRelationManager::getPluginGroupContentTypeMap in Group 2.0.x
Retrieves a list of group content type IDs per plugin ID.
Return value
array An array of group content type ID arrays, keyed by plugin ID.
Overrides GroupRelationManagerInterface::getPluginGroupContentTypeMap
2 calls to GroupRelationManager::getPluginGroupContentTypeMap()
- GroupRelationManager::getGroupContentTypeIds in src/
Plugin/ Group/ Relation/ GroupRelationManager.php - Retrieves all of the group content type IDs for a content plugin.
- GroupRelationManager::getInstalledIds in src/
Plugin/ Group/ Relation/ GroupRelationManager.php - Returns the plugin ID of all group relations in use.
File
- src/
Plugin/ Group/ Relation/ GroupRelationManager.php, line 355
Class
- GroupRelationManager
- Manages GroupRelation plugin implementations.
Namespace
Drupal\group\Plugin\Group\RelationCode
public function getPluginGroupContentTypeMap() {
$map = $this
->getCachedPluginGroupContentTypeMap();
if (!isset($map)) {
$map = [];
/** @var \Drupal\group\Entity\GroupContentTypeInterface[] $group_content_types */
$group_content_types = $this
->getGroupContentTypeStorage()
->loadMultiple();
foreach ($group_content_types as $group_content_type) {
$map[$group_content_type
->getRelationPluginId()][] = $group_content_type
->id();
}
$this
->setCachedPluginGroupContentTypeMap($map);
}
return $map;
}