function csl_name::init_attrs in Bibliography Module 7.2
Same name and namespace in other branches
- 6.2 modules/CiteProc/CSL.inc \csl_name::init_attrs()
- 7 modules/CiteProc/CSL.inc \csl_name::init_attrs()
1 call to csl_name::init_attrs()
- csl_name::render in modules/
CiteProc/ CSL.inc
File
- modules/
CiteProc/ CSL.inc, line 437
Class
Code
function init_attrs($mode) {
// $and = $this->get_attributes('and');
if (isset($this->and)) {
if ($this->and == 'text') {
$this->and = $this->citeproc
->get_locale('term', 'and');
}
elseif ($this->and == 'symbol') {
$this->and = '&';
}
}
if (isset($this->citeproc)) {
$style_attrs = $this->citeproc->style
->get_hier_attributes();
$mode_attrs = $this->citeproc->{$mode}
->get_hier_attributes();
$this->attributes = array_merge($style_attrs, $mode_attrs, $this->attributes);
}
if (!isset($this->delimiter)) {
$this->delimiter = $this->{'name-delimiter'};
}
if (!isset($this->alnum)) {
list($this->alnum, $this->alpha, $this->cntrl, $this->dash, $this->digit, $this->graph, $this->lower, $this->print, $this->punct, $this->space, $this->upper, $this->word, $this->patternModifiers) = $this
->get_regex_patterns();
}
$this->dpl = $this->{'delimiter-precedes-last'};
$this->sort_separator = isset($this->{'sort-separator'}) ? $this->{'sort-separator'} : ', ';
$this->form = isset($this->form) ? $this->form : 'long';
$this->attr_init = $mode;
}