function rdf_mapping_load

Returns the mapping for attributes of a given entity type/bundle pair.

Parameters

$type: An entity type.

$bundle: (optional) A bundle name.

Return value

The mapping corresponding to the requested entity type/bundle pair or an empty array.

Related topics

7 calls to rdf_mapping_load()
MappingHookTest::testMapping in drupal/core/modules/rdf/lib/Drupal/rdf/Tests/MappingHookTest.php
Tests that hook_rdf_mapping() correctly returns and processes mapping.
RdfaMarkupTest::testAttributesInMarkupFile in drupal/core/modules/rdf/lib/Drupal/rdf/Tests/RdfaMarkupTest.php
Tests if file fields in teasers have correct resources.
RdfaMarkupTest::testDrupalRdfaAttributes in drupal/core/modules/rdf/lib/Drupal/rdf/Tests/RdfaMarkupTest.php
Tests rdf_rdfa_attributes().
rdf_entity_load in drupal/core/modules/rdf/rdf.module
Implements hook_entity_load().
rdf_preprocess_field in drupal/core/modules/rdf/rdf.module
Implements hook_preprocess_HOOK() for field.tpl.php.

... See full list

1 string reference to 'rdf_mapping_load'
tracker_page in drupal/core/modules/tracker/tracker.pages.inc
Page callback: Generates a page of tracked nodes for the site.

File

drupal/core/modules/rdf/rdf.module, line 137
Enables semantically enriched output for Drupal sites in the form of RDFa.

Code

function rdf_mapping_load($type, $bundle = RDF_DEFAULT_BUNDLE) {

  // Retrieves the bundle-specific mapping from the entity info.
  $entity_info = entity_get_info($type);
  if (!empty($entity_info['bundles'][$bundle]['rdf_mapping'])) {
    return $entity_info['bundles'][$bundle]['rdf_mapping'];
  }
  else {
    return _rdf_get_default_mapping($type);
  }
}