You are here

private function EndnoteEncoder::addTag in Bibliography & Citation 2.0.x

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

Add value to xml tag.

Parameters

\SimpleXMLElement $xml: Parent XmlElement.

string $tag: Xml tag to add.

string $value: Text to set.

5 calls to EndnoteEncoder::addTag()
EndnoteEncoder::addDates in modules/bibcite_endnote/src/Encoder/EndnoteEncoder.php
Add dates to xml.
EndnoteEncoder::addFields in modules/bibcite_endnote/src/Encoder/EndnoteEncoder.php
Add fields to xml.
EndnoteEncoder::addKeywords in modules/bibcite_endnote/src/Encoder/EndnoteEncoder.php
Add keywords to xml.
EndnoteEncoder::addTitles in modules/bibcite_endnote/src/Encoder/EndnoteEncoder.php
Add titles to xml.
EndnoteEncoder::encode in modules/bibcite_endnote/src/Encoder/EndnoteEncoder.php

File

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

Class

EndnoteEncoder
Endnote format encoder.

Namespace

Drupal\bibcite_endnote\Encoder

Code

private function addTag(&$xml, $tag, $value) {
  $xc = $xml
    ->addChild($tag);
  $this
    ->setStyledText($xc, $value);
}