You are here

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

Adds all errors to the XML document.

1 call to views_oai_pmh_plugin_style::xml_append_errors()
views_oai_pmh_plugin_style::render in plugins/views_oai_pmh_plugin_style.inc
Render.

File

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

Class

views_oai_pmh_plugin_style
Views OAI-PMH_plugin style.

Code

protected function xml_append_errors() {
  foreach ($this->request->errors as $error) {
    $error_element = $this->xml
      ->createElement('error', $error
      ->get_message());
    $error_element
      ->setAttribute('code', $error->code);
    $this->xml_root
      ->appendChild($error_element);
  }
}