Support for custom entity types

Created on 17 June 2024, 5 months ago

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;
          }
Feature request
Status

Active

Version

1.0

Component

Source: Entity

Created by

🇳🇱Netherlands nickvanboven

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024