You are here

public function citeproc::render in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 modules/CiteProc/CSL.inc \citeproc::render()
  2. 7.2 modules/CiteProc/CSL.inc \citeproc::render()

File

modules/CiteProc/CSL.inc, line 95
CiteProc-PHP.

Class

citeproc

Code

public function render($data, $mode = NULL) {
  $text = '';
  switch ($mode) {
    case 'citation':
      $text .= isset($this->citation) ? $this->citation
        ->render($data) : '';
      break;
    case 'bibliography':
    default:
      $text .= isset($this->bibliography) ? $this->bibliography
        ->render($data) : '';
      break;
  }
  return $text;
}