private function RSSSimpleXMLElement::addCdata in Facebook Instant Articles 7
Same name and namespace in other branches
- 7.2 modules/fb_instant_articles_rss/src/RSSSimpleXMLElement.php \Drupal\fb_instant_articles_rss\RSSSimpleXMLElement::addCdata()
Adds CDATA text in a node.
Parameters
string $cdata_text: The CDATA value to add.
File
- modules/
fb_instant_articles_rss/ src/ RSSSimpleXMLElement.php, line 24 - Contains \Drupal\fb_instant_articles_rss\RSSSimpleXMLElement.
Class
- RSSSimpleXMLElement
- Extension for SimpleXMLElement.
Namespace
Drupal\fb_instant_articles_rssCode
private function addCdata($cdata_text) {
$node = dom_import_simplexml($this);
if (($no = $node->ownerDocument) && is_string($cdata_text)) {
$node
->appendChild($no
->createCDATASection($cdata_text));
}
}