public function ReportEditor::setOptions in Forena Reports 7.5
Same name and namespace in other branches
- 8 src/Editor/ReportEditor.php \Drupal\forena\Editor\ReportEditor::setOptions()
Set the options list for the report Enter description here ...
Parameters
unknown_type $option_data:
File
- src/
Editor/ ReportEditor.php, line 548 - ReportEditor.inc Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd
Class
Namespace
Drupal\forena\EditorCode
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);
}
}
}
}