public function EntityEmbedDisplayManager::getDefinitionOptionsForEntityType in Entity Embed 8
Gets definition options for entity type.
Provides a list of plugins that can be used for a certain entity type and filters out plugins that should be hidden in the UI.
Parameters
string $entity_type: The entity type id.
Return value
array An array of valid plugin labels, keyed by plugin ID.
File
- src/
EntityEmbedDisplay/ EntityEmbedDisplayManager.php, line 164
Class
- EntityEmbedDisplayManager
- Provides an Entity Embed display plugin manager.
Namespace
Drupal\entity_embed\EntityEmbedDisplayCode
public function getDefinitionOptionsForEntityType($entity_type) {
$definitions = $this
->getDefinitionsForContexts([
'entity_type' => $entity_type,
]);
$definitions = $this
->filterExposedDefinitions($definitions);
return array_map(function ($definition) {
return (string) $definition['label'];
}, $definitions);
}