public function FrxEditor::getDocgen in Forena Reports 7.4
Gets the array of selected document types or default if they are present.
Return value
array
1 call to FrxEditor::getDocgen()
- FrxEditor::ensureDocGen in ./
FrxEditor.inc - Makes sure specific document types are asserted.
File
- ./
FrxEditor.inc, line 357 - FrxEditor.inc Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd
Class
- FrxEditor
- @file FrxEditor.inc Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd
Code
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;
}