You are here

public function ReportEditor::setParameters in Forena Reports 8

Same name and namespace in other branches
  1. 7.5 src/Editor/ReportEditor.php \Drupal\forena\Editor\ReportEditor::setParameters()

Set report parameters Enter description here ...

Parameters

array $parmElements array:

File

src/Editor/ReportEditor.php, line 490
ReportEditor.inc Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd

Class

ReportEditor

Namespace

Drupal\forena\Editor

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',
    'label_field',
    'type',
    'class',
    'options',
  ), 'default');
}