You are here

function rdf_modules_installed in Drupal 7

Implements hook_modules_installed().

Checks if the installed modules have any RDF mapping definitions to declare and stores them in the rdf_mapping table.

While both default entity mappings and specific bundle mappings can be defined in hook_rdf_mapping(), default entity mappings are not stored in the database. Only overridden mappings are stored in the database. The default entity mappings can be overriden by specific bundle mappings which are stored in the database and can be altered via the RDF CRUD mapping API.

1 call to rdf_modules_installed()
rdf_install in modules/rdf/rdf.install
Implements hook_install().

File

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

Code

function rdf_modules_installed($modules) {
  foreach ($modules as $module) {
    $function = $module . '_rdf_mapping';
    if (function_exists($function)) {
      foreach ($function() as $mapping) {

        // Only the bundle mappings are saved in the database.
        if ($mapping['bundle'] !== RDF_DEFAULT_BUNDLE) {
          rdf_mapping_save($mapping);
        }
      }
    }
  }
}