function views_oai_pmh_plugin_style_misc::render_records in Views OAI-PMH 7.2
Same name and namespace in other branches
- 6.2 plugins/views_oai_pmh_plugin_style_misc.inc \views_oai_pmh_plugin_style_misc::render_records()
File
- plugins/
views_oai_pmh_plugin_style_misc.inc, line 43 - Definition of the views_oai_pmh_plugin_style_misc class.
Class
- views_oai_pmh_plugin_style_misc
- @file Definition of the views_oai_pmh_plugin_style_misc class.
Code
function render_records() {
if (!empty($this->display->handler->oai_args['errors'])) {
return '';
}
if ($this
->uses_row_plugin() && empty($this->row_plugin)) {
vpr('views_plugin_style_default: Missing row plugin');
return '';
}
$records = '';
if ($this
->uses_row_plugin()) {
$rows = array();
foreach ($this->view->result as $row_index => $row) {
$this->view->row_index = $row_index;
// Render the individual row.
$fields = $this->row_plugin
->render($row);
// Theme the rendered row.
$themed_record = theme($GLOBALS['views_oai_pmh'][$this->_metadata_format]->record_theme, array(
'nid' => $row->nid,
'node_changed' => $row->node_changed,
'fields' => $fields,
));
$records .= $themed_record;
}
}
return $records;
}