public function FrxEditor::setDocgen in Forena Reports 7.4
Same name and namespace in other branches
- 7.3 FrxEditor.inc \FrxEditor::setDocgen()
Set document generation types that apply to this report. Enter description here ...
Parameters
unknown_type $docgenElements:
1 call to FrxEditor::setDocgen()
- FrxEditor::ensureDocGen in ./
FrxEditor.inc - Makes sure specific document types are asserted.
File
- ./
FrxEditor.inc, line 383 - 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 setDocgen($doctypes) {
$docgenElements = array();
if ($selected = array_filter($doctypes)) {
if ($selected) {
foreach ($selected as $key => $value) {
if ($value) {
$docgenElements[] = array(
'type' => $key,
);
}
}
}
}
$dom = $this->dom;
$newDocs = $dom
->createElementNS($this->xmlns, 'docgen');
$this
->verifyHeaderElements(array(
'docgen',
));
$dnode = $dom
->getElementsByTagNameNS($this->xmlns, 'docgen')
->item(0);
$p = $dnode->parentNode;
$p
->replaceChild($newDocs, $dnode);
$this
->setFrxHeader('docgen', 'doc', $docgenElements, array(
'type',
), NULL, 'type');
}