You are here

public function views_oai_pmh_plugin_style::render in Views OAI-PMH 7.3

Same name and namespace in other branches
  1. 6.2 plugins/views_oai_pmh_plugin_style.inc \views_oai_pmh_plugin_style::render()
  2. 6 plugins/views_oai_pmh_plugin_style.inc \views_oai_pmh_plugin_style::render()
  3. 7 plugins/views_oai_pmh_plugin_style.inc \views_oai_pmh_plugin_style::render()
  4. 7.2 plugins/views_oai_pmh_plugin_style.inc \views_oai_pmh_plugin_style::render()

Render.

Overrides views_plugin_style::render

File

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

Class

views_oai_pmh_plugin_style
Views OAI-PMH_plugin style.

Code

public function render() {
  $this
    ->xml_init();
  $this
    ->xml_append_request();

  // Perform the render action specified by the requested OAI-PMH verb.
  if ($this->request->verb && !$this->request->errors) {
    $callback = $this->request->callback . '_render';
    if (method_exists($this, $callback)) {
      call_user_func(array(
        $this,
        $callback,
      ));
    }
  }

  // Append all errors, if any, to the XML document.
  $this
    ->xml_append_errors();
  $variables = array(
    'view' => $this->view,
    'options' => $this->options,
    'request' => $this->request,
    'xml' => $this->xml,
    'xml_root' => $this->xml_root,
    'xml_verb' => $this->xml_verb,
  );
  return theme('views_oai_pmh_response', $variables);
}