You are here

public function RendererBase::extractChildSource in Forena Reports 8

Get the textual representations of html for the configuration engine.

1 call to RendererBase::extractChildSource()
RendererBase::extractXPathInnerHTML in src/FrxPlugin/Renderer/RendererBase.php
Extracts the inner html of all nodes that match a particular xpath expression.

File

src/FrxPlugin/Renderer/RendererBase.php, line 950
FrxRenderer.php Base class for FrxAPI custom Renderer @author davidmetzler

Class

RendererBase
Crosstab Renderer

Namespace

Drupal\forena\FrxPlugin\Renderer

Code

public function extractChildSource(DOMNode $node) {
  $content = '';
  foreach ($node->childNodes as $child) {
    switch ($child->nodeType) {
      case XML_ELEMENT_NODE:
        $content .= $this->report->dom
          ->saveXML($child);
        break;
      case XML_TEXT_NODE:
      case XML_ENTITY_REF_NODE:
      case XML_ENTITY_NODE:
        $content .= $child->textContent;
        break;
      case XML_COMMENT_NODE:
        $content .= '<!--' . $child->data . '-->';
        break;
    }
  }
  return $content;
}