protected function views_oai_pmh_plugin_style::list_records_render in Views OAI-PMH 7.3
Renders a response to the 'ListRecords' OAI-PMH request.
File
- plugins/
views_oai_pmh_plugin_style.inc, line 397 - Contains the base OAI-PMH style plugin.
Class
- views_oai_pmh_plugin_style
- Views OAI-PMH_plugin style.
Code
protected function list_records_render() {
if ($this->view->result) {
$this
->xml_append_verb();
foreach ($this->view->result as $row_index => $row) {
$record = $this->xml
->createElement('record');
$this->xml_verb
->appendChild($record);
$this
->append_record_header($record, $row_index, $row);
$this
->append_record_metadata($record, $row_index, $row);
}
$this
->save_resumption_token();
}
else {
$this->request->errors[] = new views_oai_pmh_error_no_records_match();
}
}