function FrxRenderer::addNode in Forena Reports 7.4
Add a node to the existing dom element with attributes
Parameters
$cur_node DOMNode Parent node:
$indent Integer Text indentation.:
$tag String Tag name:
$value String text value of the element:
$attributes array Html attributes to add:
$frx_attributes array FRX attributes.:
Return value
void|unknown
9 calls to FrxRenderer::addNode()
- FrxCrosstab::generate in renderers/
FrxCrosstab.inc - Generate the template from the configuration.
- FrxEmailMerge::generate in renderers/
FrxEmailMerge.inc - Generate the template from the configuration.
- FrxFieldTable::generate in renderers/
FrxFieldTable.inc - Generate the template from the configuration.
- FrxInclude::generate in renderers/
FrxInclude.inc - Implement template generator.
- FrxRenderer::blockDiv in renderers/
FrxRenderer.inc - Generate generic div tag.
File
- renderers/
FrxRenderer.inc, line 610 - FrxRenderer.inc Base class for Frx custom renderers @author davidmetzler
Class
- FrxRenderer
- @file FrxRenderer.inc Base class for Frx custom renderers @author davidmetzler
Code
function addNode($cur_node, $indent, $tag = 'div', $value = '', $attributes = array(), $frx_attributes = array()) {
$dom = $this->dom;
if (!$cur_node) {
return;
}
if ($indent) {
$tnode = $dom
->createTextNode("\n" . str_repeat(' ', $indent));
$cur_node
->appendChild($tnode);
}
$node = $this->dom
->createElement($tag, $value);
$cur_node
->appendChild($node);
$this
->setAttributes($node, $attributes, $frx_attributes);
$cur_node
->appendChild($this->dom
->createTextNode(""));
return $node;
}