You are here

class csl_bibliography in Bibliography Module 6.2

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

Hierarchy

Expanded class hierarchy of csl_bibliography

File

modules/CiteProc/CSL.inc, line 1396

View source
class csl_bibliography extends csl_format {
  private $layout = NULL;
  function init($dom_node, $citeproc) {
    $hier_name_attr = $this
      ->get_hier_attributes();
    $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 init_formatting() {

    // $this->div_class = 'csl-bib-body';
    parent::init_formatting();
  }
  function render($data, $mode = NULL) {
    $this->citeproc->quash = array();
    $text = $this->layout
      ->render($data, 'bibliography');
    if ($this->{'hanging-indent'} == 'true') {
      $text = '<div style="  text-indent: -25px; padding-left: 25px;">' . $text . '</div>';
    }
    $text = str_replace('?.', '?', str_replace('..', '.', $text));
    return $this
      ->format($text);
  }

}

Members