You are here

function theme_views_oai_pmh_record_header in Views OAI-PMH 7

Same name and namespace in other branches
  1. 6.2 theme/views_oai_pmh.theme.inc \theme_views_oai_pmh_record_header()
  2. 6 theme/views_oai_pmh.theme.inc \theme_views_oai_pmh_record_header()
  3. 7.2 theme/views_oai_pmh.theme.inc \theme_views_oai_pmh_record_header()
2 theme calls to theme_views_oai_pmh_record_header()
theme_views_oai_pmh_dc_record in theme/views_oai_pmh.theme.inc
views_oai_pmh_plugin_style::render_identifiers in plugins/views_oai_pmh_plugin_style.inc

File

theme/views_oai_pmh.theme.inc, line 95
Theme related functions for processing our output style plugins.

Code

function theme_views_oai_pmh_record_header($vars) {
  global $base_url;
  static $parts = array();
  if (empty($parts)) {
    $parts = parse_url($base_url);
  }
  $nid = $vars['nid'];
  $datestamp = $vars['node_changed'];
  $info['header']['identifier'] = 'oai:' . $parts['host'] . ':' . $nid;
  $info['header']['datestamp'] = gmstrftime('%Y-%m-%dT%H:%M:%SZ', $datestamp);

  //  $info['header']['setSpec'] = '';
  return format_xml_elements($info);
}