function _rdf_mapping_load_multiple

Helper function to retrieve a set of RDF mappings from the database.

Parameters

$type: The entity type of the mappings.

$bundles: The bundles the mappings refer to.

Return value

An array of RDF mapping structures, or an empty array.

2 calls to _rdf_mapping_load_multiple()
rdf_entity_info_alter in modules/rdf/rdf.module
Implements hook_entity_info_alter().
_rdf_mapping_load in modules/rdf/rdf.module
Helper function to retrieve an RDF mapping from the database.

File

modules/rdf/rdf.module, line 208

Code

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.