You are here

public function HTML::flush in Forena Reports 8

Write the output to disk.

Return value

mixed

Overrides DocumentBase::flush

File

src/FrxPlugin/Document/HTML.php, line 25
HTML Straight html document with no wrapping theme. @author davidmetzler

Class

HTML
Provides Straight HTML page suitable for replacements

Namespace

Drupal\forena\FrxPlugin\Document

Code

public function flush() {
  $css = '';
  $output = '<html><head>';
  $output .= '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>';
  $this->title;

  // @TODO: Add inline styles and css libraries
  if ($css) {
    $output = '<style type="text/css">';
    $output .= $css;

    /*
    if (isset($r->rpt_xml->head->style)) {
      $sheet = (string)$r->rpt_xml->head->style;
      $output .= $sheet;
    }
    */
    $output .= '</style>';
  }
  $output .= '<title>' . $this->title . '</title></head><body class="forena-report"><h1>' . $this->title . '</h1>' . $this->write_buffer . '</body></html>';
  return $output;
}