You are here

public function csl_layout::render in Bibliography Module 7

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

Overrides csl_rendering_element::render

File

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

Class

csl_layout

Code

public function render($data, $mode = NULL) {
  $text = '';
  $parts = array();

  // $delimiter = $this->delimiter;.
  foreach ($this->elements as $element) {
    $parts[] = $element
      ->render($data, $mode);
  }
  $text = implode($this->delimiter, $parts);
  if ($mode == 'bibliography') {
    return $this
      ->format($text);
  }
  else {
    return $text;
  }
}