You are here

public function FrxReportEditor::removeParm in Forena Reports 7.2

Same name and namespace in other branches
  1. 6.2 FrxReportEditor.inc \FrxReportEditor::removeParm()
  2. 6 FrxReportEditor.inc \FrxReportEditor::removeParm()
  3. 7 FrxReportEditor.inc \FrxReportEditor::removeParm()

File

./FrxReportEditor.inc, line 363

Class

FrxReportEditor
Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd

Code

public function removeParm($id) {
  $dom = $this->dom;
  $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);
    }
  }
}