public function ReportEditor::getMenu in Forena Reports 8
Same name and namespace in other branches
- 7.5 src/Editor/ReportEditor.php \Drupal\forena\Editor\ReportEditor::getMenu()
File
- src/
Editor/ ReportEditor.php, line 592 - 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 getMenu() {
$dom = $this->dom;
$this
->verifyHeaderElements(array(
'menu',
));
$opts = $dom
->getElementsByTagNameNS($this->xmlns, 'menu')
->item(0);
$ret = array();
// Simplexml is easier to work with
$options = simplexml_import_dom($opts);
foreach ($options
->attributes() as $key => $value) {
$ret[(string) $key] = (string) $value;
}
return $ret;
}