public function TemplateBase::innerXML in Forena Reports 8
Return the inside xml of the current node
Parameters
\SimpleXMLElement $xml: XML Node of report containing block.
Return value
string String representation of node children.
Overrides FrxAPI::innerXML
2 calls to TemplateBase::innerXML()
- FrxSection::generate in src/
FrxPlugin/ Template/ FrxSection.php - Build document from the existing template.
- FrxSection::scrapeConfig in src/
FrxPlugin/ Template/ FrxSection.php - [@inheritdoc}
File
- src/
FrxPlugin/ Template/ TemplateBase.php, line 38 - FrxRenderer.php Base class for FrxAPI custom Renderer @author davidmetzler
Class
Namespace
Drupal\forena\TemplateCode
public function innerXML(\SimpleXMLElement $xml) {
$tag = $xml
->getName();
$text = '';
if (is_object($xml) && is_object($xml->{$tag})) {
$text = $xml
->asXML();
$text = preg_replace("/<\\/?" . $tag . "(.|\\s)*?>/", "", $text);
}
return $text;
}