You are here

public function FrxReportEditor::setParameters in Forena Reports 6

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

Set report parameters Enter description here ...

Parameters

array $parmElements array:

File

./FrxReportEditor.inc, line 267

Class

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

Code

public function setParameters($parmElements) {
  $dom = $this->dom;
  $newParms = $dom
    ->createElementNS($this->xmlns, 'parameters');
  $this
    ->verifyHeaderElements(array(
    'parameters',
  ));
  $fnode = $dom
    ->getElementsByTagNameNS($this->xmlns, 'parameters')
    ->item(0);
  $p = $fnode->parentNode;
  $p
    ->replaceChild($newParms, $fnode);
  $this
    ->setFrxHeader('parameters', 'parm', $parmElements, array(
    'id',
    'label',
    'require',
    'desc',
    'data_source',
    'data_field',
    'type',
  ), 'value');
}