public function csl_number::render in Bibliography Module 7
Same name and namespace in other branches
- 6.2 modules/CiteProc/CSL.inc \csl_number::render()
- 7.2 modules/CiteProc/CSL.inc \csl_number::render()
Overrides csl_rendering_element::render
File
- modules/
CiteProc/ CSL.inc, line 1340 - CiteProc-PHP.
Class
Code
public function render($data, $mode = NULL) {
$var = $this->variable;
if (!$var || empty($data->{$var})) {
return;
}
// $form = $this->form;.
switch ($this->form) {
case 'ordinal':
$text = $this
->ordinal($data->{$var});
break;
case 'long-ordinal':
$text = $this
->long_ordinal($data->{$var});
break;
case 'roman':
$text = $this
->roman($data->{$var});
break;
case 'numeric':
default:
$text = $data->{$var};
break;
}
return $this
->format($text);
}