public function RendererBase::removeChildrenExcept in Forena Reports 8
Removes all chidren from the dome node expect those with a tagname specified by the the $tags argurment
Parameters
DomNode $node : Parent node to remove from
array $tags : Tags to eingore
File
- src/
FrxPlugin/ Renderer/ RendererBase.php, line 915 - FrxRenderer.php Base class for FrxAPI custom Renderer @author davidmetzler
Class
- RendererBase
- Crosstab Renderer
Namespace
Drupal\forena\FrxPlugin\RendererCode
public function removeChildrenExcept(DOMNode $node, $tags = array(
'table',
)) {
foreach ($node->childNodes as $child) {
if ($child->nodeType != XML_ELEMENT_NODE || array_search($child->tagName, $tags) === FALSE) {
$this
->removeChildren($child);
$node
->removeChild($child);
}
}
}