You are here

public function FrxReport::parametersArray in Forena Reports 7.3

Same name and namespace in other branches
  1. 7.4 FrxReport.inc \FrxReport::parametersArray()
1 call to FrxReport::parametersArray()
FrxReport::parametersForm in ./FrxReport.inc

File

./FrxReport.inc, line 712
Basic report provider. Controls the rendering of the report.

Class

FrxReport

Code

public function parametersArray() {
  $parameters = array();
  $head = $this->rpt_xml->head;

  //FrxReportGenerator::instance()->alter_parameters('', $parms);
  $nodes = $head
    ->xpath('frx:parameters/frx:parm');
  if ($nodes) {
    foreach ($nodes as $node) {
      $parm_def = array();
      $parm_def['default'] = (string) $node;
      foreach ($node
        ->attributes() as $key => $value) {
        $parm_def[$key] = (string) $value;
      }
      $id = @$parm_def['id'];
      $parameters[$id] = $parm_def;
    }
  }
  return $parameters;
}