You are here

public function FrxEditor::setCategory in Forena Reports 7.4

Same name and namespace in other branches
  1. 7.3 FrxEditor.inc \FrxEditor::setCategory()

Set the report category Enter description here ...

Parameters

unknown_type $cateogry:

File

./FrxEditor.inc, line 454
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 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);
}