Helper function to retrieve a set of RDF mappings from the database.
$type: The entity type of the mappings.
$bundles: The bundles the mappings refer to.
An array of RDF mapping structures, or an empty array.
function _rdf_mapping_load_multiple($type, array $bundles) {
$mappings = db_select('rdf_mapping')
->fields(NULL, array(
'bundle',
'mapping',
))
->condition('type', $type)
->condition('bundle', $bundles)
->execute()
->fetchAllKeyed();
foreach ($mappings as $bundle => $mapping) {
$mappings[$bundle] = unserialize($mapping);
}
return $mappings;
}