You are here

private function EndnoteEncoder::addFields in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x modules/bibcite_endnote/src/Encoder/EndnoteEncoder.php \Drupal\bibcite_endnote\Encoder\EndnoteEncoder::addFields()

Add fields to xml.

Parameters

\SimpleXMLElement $xml: Parent XmlElement.

mixed $ref: Our reference.

1 call to EndnoteEncoder::addFields()
EndnoteEncoder::encode in modules/bibcite_endnote/src/Encoder/EndnoteEncoder.php

File

modules/bibcite_endnote/src/Encoder/EndnoteEncoder.php, line 350

Class

EndnoteEncoder
Endnote format encoder.

Namespace

Drupal\bibcite_endnote\Encoder

Code

private function addFields(&$xml, &$ref) {
  foreach ($ref as $key => $value) {
    $this
      ->addTag($xml, $key, $value);
    unset($ref[$key]);
  }
}