You are here

public function ReportEditor::setTitle in Forena Reports 7.5

Same name and namespace in other branches
  1. 8 src/Editor/ReportEditor.php \Drupal\forena\Editor\ReportEditor::setTitle()

Set the report title

Parameters

String $title:

File

src/Editor/ReportEditor.php, line 497
ReportEditor.inc Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd

Class

ReportEditor

Namespace

Drupal\forena\Editor

Code

public function setTitle($title) {
  $dom = $this->dom;
  $head = $dom
    ->getElementsByTagName('head')
    ->item(0);
  $tnode = $dom
    ->getElementsByTagName('title')
    ->item(0);
  $node = $dom
    ->createElement('title', $title);
  $head
    ->replaceChild($node, $tnode);
}