$entity_type_id = NULL;
// Relationship specifier can also contain the entity type ID, i.e.
// entity:node, entity:user or entity:taxonomy.
if (str_contains($relationship_specifier, ':'
)) { [$relationship_specifier,
$entity_type_id] =
explode(':',
$relationship_specifier, 2
);
} // Check for a valid relationship.
if (isset($propertyDefinitions[$relationship_specifier]) &&
$propertyDefinitions[$relationship_specifier] instanceof DataReferenceDefinitionInterface
) { // If it is, use the entity type if specified already, otherwise use
// the definition.
$target_definition =
$propertyDefinitions[$relationship_specifier]->
getTargetDefinition();
if (!
$entity_type_id &&
$target_definition instanceof EntityDataDefinitionInterface
) { $entity_type_id =
$target_definition->
getEntityTypeId();
} $entity_type =
$this->entityTypeManager->
getActiveDefinition($entity_type_id);
$field_storage_definitions =
$this->entityFieldManager->
getActiveFieldStorageDefinitions($entity_type_id);
// Add the new entity base table using the table and sql column.
$base_table =
$this->
addNextBaseTable($entity_type,
$table,
$sql_column,
$field_storage);
$propertyDefinitions =
[];
$key++;
$index_prefix .= "
$next_index_prefix.";
}