function _rdf_mapping_load
Helper function to retrieve an RDF mapping from the database.
Parameters
$type: The entity type the mapping refers to.
$bundle: The bundle the mapping refers to.
Return value
An RDF mapping structure or an empty array if no record was found.
2 calls to _rdf_mapping_load()
- RdfCrudTestCase::testCRUD in drupal-7.x/
modules/ rdf/ rdf.test - Test inserting, loading, updating, and deleting RDF mappings.
- rdf_entity_info_alter in drupal-7.x/
modules/ rdf/ rdf.module - Implements hook_entity_info_alter().
Archivo
- drupal-7.x/
modules/ rdf/ rdf.module, line 192 - Enables semantically enriched output for Drupal sites in the form of RDFa.
Código
function _rdf_mapping_load($type, $bundle) {
$mapping = db_select('rdf_mapping')->fields(NULL, array('mapping'))->condition('type', $type)->condition('bundle', $bundle)->execute()->fetchField();
if (!$mapping) {
return array();
}
return unserialize($mapping);
}