public function Csl::getParent in Bibliography & Citation 2.0.x
Same name and namespace in other branches
- 8 src/Csl.php \Drupal\bibcite\Csl::getParent()
Get parent style identifier.
Return value
null|string Identifier of the parent style or NULL.
File
- src/
Csl.php, line 63
Class
- Csl
- Simple wrapper for CSL XML.
Namespace
Drupal\bibciteCode
public function getParent() {
/** @var \SimpleXMLElement $link */
foreach ($this->xml->info->link as $link) {
$attributes = $link
->attributes();
if (isset($attributes->rel, $attributes->href) && (string) $attributes->rel === 'independent-parent') {
return (string) $attributes->href;
}
}
return NULL;
}