You are here

protected function views_oai_pmh_plugin_style::get_record_render in Views OAI-PMH 7.3

Renders a response to the 'GetRecord' OAI-PMH request.

File

plugins/views_oai_pmh_plugin_style.inc, line 381
Contains the base OAI-PMH style plugin.

Class

views_oai_pmh_plugin_style
Views OAI-PMH_plugin style.

Code

protected function get_record_render() {
  if ($this->view->result && ($row = $this->view->result[0])) {
    $this
      ->xml_append_verb();
    $record = $this->xml
      ->createElement('record');
    $this->xml_verb
      ->appendChild($record);
    $this
      ->append_record_header($record, 0, $row);
    $this
      ->append_record_metadata($record, 0, $row);
  }
  else {
    $this->request->errors[] = new views_oai_pmh_error_unknown_id($this->request->original_args['identifier']);
  }
}