public function ReportEditor::removeParm in Forena Reports 8
Same name and namespace in other branches
- 7.5 src/Editor/ReportEditor.php \Drupal\forena\Editor\ReportEditor::removeParm()
File
- src/
Editor/ ReportEditor.php, line 686 - ReportEditor.inc Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd
Class
Namespace
Drupal\forena\EditorCode
public function removeParm($id) {
$dom = $this->dom;
/** @var DOMXPath $xpq */
$xpq = $this->xpq;
$pnode = $dom
->getElementsByTagNameNS($this->xmlns, 'parameters')
->item(0);
$path = '//frx:parameters/frx:parm[@id="' . $id . '"]';
$nodes = $xpq
->query($path);
if ($nodes->length) {
foreach ($nodes as $node) {
$pnode
->removeChild($node);
}
}
}