public function ReportEditor::setCategory in Forena Reports 7.5
Same name and namespace in other branches
- 8 src/Editor/ReportEditor.php \Drupal\forena\Editor\ReportEditor::setCategory()
Set the report category Enter description here ...
Parameters
unknown_type $cateogry:
File
- src/
Editor/ ReportEditor.php, line 510 - 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 setCategory($category) {
$ret = array();
$dom = $this->dom;
$this
->verifyHeaderElements(array(
'category',
));
$head = $dom
->getElementsByTagName('head')
->item(0);
$cnode = $dom
->getElementsByTagNameNS($this->xmlns, 'category')
->item(0);
$node = $dom
->createElementNS($this->xmlns, 'category', $category);
$head
->replaceChild($node, $cnode);
}