- Issue created by @nickvanboven
Right now i dont see a direct way to add support for custom entities, looked in the code how paragraphs are made translatable through \Drupal\tmgmt_content\Plugin\tmgmt\Source\ContentEntitySource::getEmbeddableFields
Would it be a idea to add a alter hook or event here so the if statement can be extended for custom entities?
Tried the following thats seems to be working out of the box
if ($target_entity_type->get('entity_revision_parent_type_field') && ($is_target_type_enabled || $entity->getEntityType()->get('entity_revision_parent_type_field'))) {
$embeddable_fields[$field_name] = $field_definition;
}
if($target_entity_type->id() == 'generic_entity' && $is_target_type_enabled){
$embeddable_fields[$field_name] = $field_definition;
}
Active
1.0
Source: Entity