You are here

function taxonomy_xml_get_mapping in Taxonomy import/export via XML 6.2

Translate the rdf entity mapping array into something indexed.

Return the mapping for a given entity type.

2 calls to taxonomy_xml_get_mapping()
taxonomy_xml_add_terms_as_rdf in ./rdf_format.inc
Given a list of terms, append definitions of them to the passed DOM container
taxonomy_xml_entity_to_rdf in ./rdf_format.inc
Given a Drupal object, some mapping rules and a DOMDocument, create the XML representationof the thing

File

./rdf_format.inc, line 1252
Include routines for RDF parsing and taxonomy/term creation. @author dman http://coders.co.nz

Code

function taxonomy_xml_get_mapping($type) {
  static $mappings;
  if (!isset($mappings[$type])) {
    $RDF_DEFAULT_BUNDLE = '';
    $raw_mappings = module_invoke_all('rdf_mapping');
    foreach ($raw_mappings as $mapping) {
      if ($mapping['bundle'] == $RDF_DEFAULT_BUNDLE) {
        $mappings[$mapping['type']] = $mapping;
      }
    }
  }
  return $mappings[$type]['mapping'];
}