You are here

public function CitationStyler::render in Bibliography & Citation 2.0.x

Same name and namespace in other branches
  1. 8 src/CitationStyler.php \Drupal\bibcite\CitationStyler::render()

Render CSL data to bibliographic citation.

Parameters

array|\stdClass $data: Array or object of values in CSL format.

Return value

string Rendered bibliographic citation.

Overrides CitationStylerInterface::render

File

src/CitationStyler.php, line 88

Class

CitationStyler
Render CSL data to bibliographic citation.

Namespace

Drupal\bibcite

Code

public function render($data) {
  $csl = $this
    ->getStyle()
    ->getCslText();
  $lang = $this
    ->getLanguageCode();
  return $this
    ->getProcessor()
    ->render($data, $csl, $lang);
}