protected function RdfMappingManager::mapTypesFromInput

Map an array of incoming URIs to an internal site schema URI.

Parameters

array $input_rdf_types: An array of RDF type URIs.

Return value

string The corresponding site schema type URI.

1 call to RdfMappingManager::mapTypesFromInput()
RdfMappingManager::getTypedDataIdsFromTypeUris in drupal/core/modules/rdf/lib/Drupal/rdf/RdfMappingManager.php
Convert an array of RDF type URIs to the corresponding TypedData IDs.

File

drupal/core/modules/rdf/lib/Drupal/rdf/RdfMappingManager.php, line 87
Contains RdfMappingManager.

Class

RdfMappingManager
Manager for mapping internal and external schema terms.

Namespace

Drupal\rdf

Code

protected function mapTypesFromInput($input_rdf_types) {

  // Create the event using the array of incoming RDF type URIs and the cache
  // of internal site schema URIs.
  $site_schema_types = $this->siteSchemaManager
    ->getTypes();
  $mapping_event = new MapTypesFromInputEvent($input_rdf_types, $site_schema_types);

  // Allow other modules to map the incoming type URIs to an internal site
  // schema type URI. For example, a content deployment module could take
  // URIs from the staging site's schema and map them to the corresponding
  // URI in the live site's schema.
  $this->dispatcher
    ->dispatch(RdfMappingEvents::MAP_TYPES_FROM_INPUT, $mapping_event);
  return $mapping_event
    ->getSiteSchemaUri();
}