You are here

public function FrxRenderer::resetTemplate in Forena Reports 7.4

Starting at the current report node, this function removes all child nodes. It aso removes any FRX attributes on the current as well.

Return value

Ambigous <DOMElement, unknown>

File

renderers/FrxRenderer.inc, line 394
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 resetTemplate() {
  $node = $this->reportDocDomNode;
  $this
    ->removeChildren($node);
  $tag = $node->tagName;
  $new_node = $this->dom
    ->createElement($tag);
  $this->frxAttributes = array();
  $parent = $node->parentNode;
  $parent
    ->replaceChild($new_node, $node);
  $this->reportDocDomNode = $new_node;
  $this
    ->initReportNode($new_node, $this->frxReport);
  return $node;
}