function views_oai_pmh_plugin_display::preview in Views OAI-PMH 7
Same name and namespace in other branches
- 6.2 plugins/views_oai_pmh_plugin_display.inc \views_oai_pmh_plugin_display::preview()
- 6 plugins/views_oai_pmh_plugin_display.inc \views_oai_pmh_plugin_display::preview()
- 7.3 plugins/views_oai_pmh_plugin_display.inc \views_oai_pmh_plugin_display::preview()
- 7.2 plugins/views_oai_pmh_plugin_display.inc \views_oai_pmh_plugin_display::preview()
Fully render the display.
Used for the purposes of a live preview or some other AJAXy reason.
Overrides views_plugin_display::preview
File
- plugins/
views_oai_pmh_plugin_display.inc, line 196 - Contains the OAI-PMH display plugin.
Class
- views_oai_pmh_plugin_display
- We are based on a feed display for compatibility.
Code
function preview() {
if (!isset($this->oai_args['verb']) || empty($this->oai_args['verb'])) {
$this->oai_args['verb'] = 'ListRecords';
}
$this->oai_args['response_date'] = gmstrftime('%Y-%m-%dT%H:%M:%SZ', time());
$this->oai_args['errors'] = array();
if (!empty($this->view->live_preview)) {
return '<pre>' . check_plain($this->view
->render()) . '</pre>';
}
return $this->view
->render();
}