function tokenuuid_get_contententitytype_id in Token UUID 8
Return value
array list of entities type IDs keyed by entity group
3 calls to tokenuuid_get_contententitytype_id()
- tokenuuid_help in ./
tokenuuid.module - Implements hook_help().
- tokenuuid_tokens in ./
tokenuuid.module - Implements hook_tokens().
- tokenuuid_token_info in ./
tokenuuid.module - Implements hook_token_info().
File
- ./
tokenuuid.module, line 75 - Contains tokenuuid.module.
Code
function tokenuuid_get_contententitytype_id() {
$entity_types = [];
$definitions = \Drupal::entityTypeManager()
->getDefinitions();
foreach ($definitions as $definition) {
if ($definition instanceof Entity\ContentEntityType) {
$entity_types[] = $definition
->id();
}
}
return $entity_types;
}