You are here

public function RendererBase::initReportNode in Forena Reports 8

This function is called to give the renderer the current conetxt in report rendering. It makes sure the renderer has the current DOM nodes dom documnent, and other attributes.

Parameters

DOMElement $domNode:

Report $frxReport:

Overrides RendererInterface::initReportNode

1 call to RendererBase::initReportNode()
RendererBase::resetTemplate in src/FrxPlugin/Renderer/RendererBase.php
Starting at the current report node, this function removes all child nodes. It aso removes any FRX attributes on the current as well.

File

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

Class

RendererBase
Crosstab Renderer

Namespace

Drupal\forena\FrxPlugin\Renderer

Code

public function initReportNode(DOMNode $domNode) {
  $this->reportNode = simplexml_import_dom($domNode);
  $this->reportDomNode = $domNode;
  $skin = $this
    ->getDataContext('skin');
  $this->settings = isset($skin['Report']) ? $skin['Report'] : array();
  $this->htmlAttributes = $this->reportNode
    ->attributes();
  $this->id = (string) $this->htmlAttributes['id'];
  $this->frxAttributes = $this->reportNode
    ->attributes(Report::FRX_NS);
  unset($this->xpathQuery);
  $this->xpathQuery = new DOMXPath($this->report->dom);
}