function SelectionPluginManager::getSelectionGroups
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManager.php \Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManager::getSelectionGroups()
- 8.9.x core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManager.php \Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManager::getSelectionGroups()
- 11.x core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManager.php \Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManager::getSelectionGroups()
1 call to SelectionPluginManager::getSelectionGroups()
- SelectionPluginManager::getPluginId in core/
lib/ Drupal/ Core/ Entity/ EntityReferenceSelection/ SelectionPluginManager.php
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityReferenceSelection/ SelectionPluginManager.php, line 75
Class
- SelectionPluginManager
- Plugin type manager for Entity Reference Selection plugins.
Namespace
Drupal\Core\Entity\EntityReferenceSelectionCode
public function getSelectionGroups($entity_type_id) {
$plugins = [];
$definitions = $this->getDefinitions();
// Do not display the 'broken' plugin in the UI.
unset($definitions['broken']);
foreach ($definitions as $plugin_id => $plugin) {
if (empty($plugin['entity_types']) || in_array($entity_type_id, $plugin['entity_types'])) {
$plugins[$plugin['group']][$plugin_id] = $plugin;
}
}
return $plugins;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.