Convert an array of RDF type URIs to the corresponding TypedData IDs.
array $input_rdf_types: An array of URIs for the type.
array An array containing entity_type and bundle.
\Drupal\rdf\RdfMappingException
public function getTypedDataIdsFromTypeUris($input_rdf_types) {
// Get the cache of site schema types.
$site_schema_types = $this->siteSchemaManager
->getTypes();
// Map the RDF type from the incoming data to an RDF type defined in the
// internal site schema.
$type_uri = $this
->mapTypesFromInput($input_rdf_types);
// If no site schema URI has been determined, then it's impossible to know
// what entity type to create. Throw an exception.
if ($type_uri == FALSE) {
throw new RdfMappingException(sprintf('No mapping to a site schema type URI found for incoming types (%s).', implode(',', $input_rdf_types)));
}
// Use the mapped RDF type URI to get the TypedData API ids the rest of the
// system uses (entity type and bundle).
return $site_schema_types[$type_uri];
}