class csl_bibliography in Bibliography Module 7
Same name and namespace in other branches
- 6.2 modules/CiteProc/CSL.inc \csl_bibliography
- 7.2 modules/CiteProc/CSL.inc \csl_bibliography
Hierarchy
- class \csl_collection
- class \csl_element
- class \csl_rendering_element
- class \csl_format
- class \csl_bibliography
- class \csl_format
- class \csl_rendering_element
- class \csl_element
Expanded class hierarchy of csl_bibliography
File
- modules/
CiteProc/ CSL.inc, line 1815 - CiteProc-PHP.
View source
class csl_bibliography extends csl_format {
private $layout = NULL;
/**
*
*/
public 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);
}
}
/**
*
*/
public function init_formatting() {
// $this->div_class = 'csl-bib-body';.
parent::init_formatting();
}
/**
*
*/
public 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);
}
}