You are here

public function RendererBase::resetTemplate in Forena Reports 7.5

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

src/Renderer/RendererBase.php, line 403
FrxRenderer.php Base class for Frx custom Renderer @author davidmetzler

Class

RendererBase

Namespace

Drupal\forena\Renderer

Code

public function resetTemplate() {
  $node = $this->reportDocDomNode;
  $this
    ->removeChildren($node);
  $tag = $node->tagName;
  $new_node = $this->frxReport->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;
}