public function FrxReportEditor::setOptions in Forena Reports 6.2
Same name and namespace in other branches
- 6 FrxReportEditor.inc \FrxReportEditor::setOptions()
- 7 FrxReportEditor.inc \FrxReportEditor::setOptions()
- 7.2 FrxReportEditor.inc \FrxReportEditor::setOptions()
Set the options list for the report Enter description here ...
Parameters
unknown_type $option_data:
File
- ./
FrxReportEditor.inc, line 347
Class
- FrxReportEditor
- Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd
Code
public function setOptions($option_data) {
$dom = $this->dom;
$this
->verifyHeaderElements(array(
'options',
));
$options = $dom
->getElementsByTagNameNS($this->xmlns, 'options')
->item(0);
foreach ($option_data as $key => $value) {
if ($value) {
$options
->setAttribute($key, $value);
}
else {
if ($options
->hasAttribute($key)) {
$options
->removeAttribute($key);
}
}
}
}