public function ReportEditor::getDocgen in Forena Reports 7.5
Same name and namespace in other branches
- 8 src/Editor/ReportEditor.php \Drupal\forena\Editor\ReportEditor::getDocgen()
Gets the array of selected document types or default if they are present.
Return value
array
1 call to ReportEditor::getDocgen()
- ReportEditor::ensureDocGen in src/
Editor/ ReportEditor.php - Makes sure specific document types are asserted.
File
- src/
Editor/ ReportEditor.php, line 413 - 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 getDocgen() {
//build the options and default list
$nodes = $this->simplexml->head
->xpath('//frx:doc');
if ($nodes) {
$doctypes = array();
foreach ($nodes as $doc) {
$doctypes[] = (string) $doc['type'];
}
}
else {
$doctypes = variable_get('forena_doc_formats', array());
}
// Verify that they are not disabled
$supported_types = array_keys(Frx::documentTypes());
$doctypes = array_intersect($doctypes, $supported_types);
$doctypes = array_combine($doctypes, $doctypes);
return $doctypes;
}