You are here

public function FrxRenderer::initReportNode in Forena Reports 7.4

Same name and namespace in other branches
  1. 6.2 FrxRenderer.inc \FrxRenderer::initReportNode()
  2. 7.2 FrxRenderer.inc \FrxRenderer::initReportNode()
  3. 7.3 FrxRenderer.inc \FrxRenderer::initReportNode()

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:

FrxReport $frxReport:

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

File

renderers/FrxRenderer.inc, line 40
FrxRenderer.inc Base class for Frx custom renderers @author davidmetzler

Class

FrxRenderer
@file FrxRenderer.inc Base class for Frx custom renderers @author davidmetzler

Code

public function initReportNode(DOMElement $domNode, FrxReport $frxReport) {
  $this->reportDocDomNode = $domNode;
  $this->dom = $domNode->ownerDocument;
  $this->dataProvider = Frx::Data();
  $this->reportDocNode = $node = simplexml_import_dom($domNode);
  $this->teng = $frxReport->teng;
  $this->frxReport = $frxReport;
  $this->format = $this->frxReport->format;
  $skin = Frx::Data()
    ->getContext('skin');
  $this->settings = isset($skin['FrxReport']) ? $skin['FrxReport'] : 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->dom);
}