You are here

public function FrxRenderer::setFirstNode in Forena Reports 7.4

Sets the first child element to a node and returns it. IF the node

Parameters

DOMNode $node:

unknown $tag:

unknown $indent:

Return value

Ambigous <string, void, DOMElement>

6 calls to FrxRenderer::setFirstNode()
FrxCrosstab::generate in renderers/FrxCrosstab.inc
Generate the template from the configuration.
FrxFieldTable::generate in renderers/FrxFieldTable.inc
Generate the template from the configuration.
FrxSVGGraph::generate in renderers/FrxSVGGraph.inc
Generate the template from the configuration.
FrxSVGGraph::generateCrossTab in renderers/FrxSVGGraph.inc
Generate a crosstab table.
FrxSVGGraph::generateTable in renderers/FrxSVGGraph.inc
Generate a basic table.

... See full list

File

renderers/FrxRenderer.inc, line 817
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 setFirstNode(DOMElement $parent_node, $indent = 0, $tag = 'div', $value = '', $attributes = array(), $frx_attributes = array()) {
  $dom = $this->dom;
  if (!$parent_node) {
    return;
  }
  $nodes = $parent_node
    ->getElementsByTagName($tag);
  if ($nodes->length) {
    $node = $nodes
      ->item(0);
    $this
      ->setAttributes($node, $attributes, $frx_attributes);
  }
  else {
    $node = $this
      ->addNode($parent_node, $indent, $tag, $value, $attributes, $frx_attributes);
  }
  return $node;
}