You are here

public function csl_citation::init in Bibliography Module 7

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

Overrides csl_element::init

File

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

Class

csl_citation

Code

public 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);
  }
}