You are here

class csl_citation in Bibliography Module 7.2

Same name and namespace in other branches
  1. 6.2 modules/CiteProc/CSL.inc \csl_citation
  2. 7 modules/CiteProc/CSL.inc \csl_citation

Hierarchy

Expanded class hierarchy of csl_citation

File

modules/CiteProc/CSL.inc, line 1292

View source
class csl_citation extends csl_format {
  private $layout = NULL;
  function init($dom_node, $citeproc) {
    $options = $dom_node
      ->getElementsByTagName('option');
    foreach ($options as $option) {
      $value = $option
        ->getAttribute('value');
      $name = $option
        ->getAttribute('name');
      $this->attributes[$name] = $value;
    }
    $layouts = $dom_node
      ->getElementsByTagName('layout');
    foreach ($layouts as $layout) {
      $this->layout = new csl_layout($layout, $citeproc);
    }
  }
  function render($data, $mode = NULL) {
    $text = $this->layout
      ->render($data, 'citation');
    return $this
      ->format($text);
  }

}

Members