public function FrxEditor::setFields in Forena Reports 7.3
Same name and namespace in other branches
- 7.4 FrxEditor.inc \FrxEditor::setFields()
Builds the fields from an array of elements. Enter description here ...
Parameters
$fieldElements:
File
- ./
FrxEditor.inc, line 230 - 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 setFields($fieldElements) {
$dom = $this->dom;
$newFields = $dom
->createElementNS($this->xmlns, 'fields');
$this
->verifyHeaderElements(array(
'fields',
));
$fnode = $dom
->getElementsByTagNameNS($this->xmlns, 'fields')
->item(0);
$p = $fnode->parentNode;
$p
->replaceChild($newFields, $fnode);
$this
->setFrxHeader('fields', 'field', $fieldElements, array(
'id',
'link',
'format',
'format-string',
'target',
'rel',
'class',
'add-query',
), 'default');
}