function rdf_get_namespaces

Retrieves RDF namespaces.

Invokes hook_rdf_namespaces() and collects RDF namespaces from modules that implement it.

Related topics

4 calls to rdf_get_namespaces()
GetRdfNamespacesTest::testGetRdfNamespaces in drupal/core/modules/rdf/lib/Drupal/rdf/Tests/GetRdfNamespacesTest.php
Tests getting RDF namespaces.
rdf_preprocess_html in drupal/core/modules/rdf/rdf.module
Implements hook_preprocess_HOOK() for html.tpl.php.
Rss::render in drupal/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php
Render a row object. This usually passes through to a theme template of some form, but not always.
RssFields::render in drupal/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php
Render a row object. This usually passes through to a theme template of some form, but not always.
2 string references to 'rdf_get_namespaces'
Rss::render in drupal/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php
Render a row object. This usually passes through to a theme template of some form, but not always.
RssFields::render in drupal/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php
Render a row object. This usually passes through to a theme template of some form, but not always.

File

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

Code

function rdf_get_namespaces() {
  $namespaces = array();

  // In order to resolve duplicate namespaces by using the earliest defined
  // namespace, do not use module_invoke_all().
  foreach (module_implements('rdf_namespaces') as $module) {
    $function = $module . '_rdf_namespaces';
    if (function_exists($function)) {
      $namespaces = NestedArray::mergeDeep($function(), $namespaces);
    }
  }
  return $namespaces;
}