You are here

public function RendererBase::initReportNode in Forena Reports 7.5

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:

1 call to RendererBase::initReportNode()
RendererBase::resetTemplate in src/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/Renderer/RendererBase.php, line 43
FrxRenderer.php Base class for Frx custom Renderer @author davidmetzler

Class

RendererBase

Namespace

Drupal\forena\Renderer

Code

public function initReportNode(DOMElement $domNode, Report $frxReport) {
  $this->reportDocDomNode = $domNode;
  $this->dataProvider = Frx::Data();
  $this->reportDocNode = $node = simplexml_import_dom($domNode);
  $this->frxReport = $frxReport;
  $this->format = $this->frxReport->format;
  $skin = Frx::Data()
    ->getContext('skin');
  $this->settings = isset($skin['Report']) ? $skin['Report'] : array();
  $this->htmlAttributes = $node
    ->attributes();
  $this->id = (string) $this->htmlAttributes['id'];
  $this->frxAttributes = $node
    ->attributes(FRX_NS);
  unset($this->xpathQuery);
  $this->xpathQuery = new DOMXPath($this->frxReport->dom);
}