Define the supported entity types.
Return value
string[] The entity types.
2 calls to _entity_clone_extra_supported_entity_types()
- entity_clone_extras_entity_access in modules/
entity_clone_extras/ entity_clone_extras.module - Implements hook_entity_access().
- entity_clone_extras_entity_operation_alter in modules/
entity_clone_extras/ entity_clone_extras.module - Implements hook_entity_operation_alter().
File
-
modules/
entity_clone_extras/ entity_clone_extras.module, line 71
Code
function _entity_clone_extra_supported_entity_types() {
$entity_types = [
'node',
];
// Support media entities when media module is installed.
if (\Drupal::moduleHandler()->moduleExists('media')) {
$entity_types[] = 'media';
}
return $entity_types;
}