public function Report::parametersArray in Forena Reports 8
Same name and namespace in other branches
- 7.5 src/Report.php \Drupal\forena\Report::parametersArray()
File
- src/
Report.php, line 613 - Basic report provider. Controls the rendering of the report.
Class
Namespace
Drupal\forenaCode
public function parametersArray() {
$parameters = array();
/** @var \SimpleXMLElement $head */
$head = $this->rpt_xml->head;
$nodes = $head
->xpath('frx:parameters/frx:parm');
if ($nodes) {
/** @var \SimpleXMLElement $node */
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;
}