public function FrxHtmlDoc::render in Forena Reports 7.3
Same name and namespace in other branches
- 7.4 docformats/FrxHtmlDoc.inc \FrxHtmlDoc::render()
Overrides FrxDocument::render
File
- docformats/
FrxHtmlDoc.inc, line 9 - FrxHtmlDoc Straight html document with no wrapping theme. @author davidmetzler
Class
- FrxHtmlDoc
- @file FrxHtmlDoc Straight html document with no wrapping theme. @author davidmetzler
Code
public function render($r, $format, $options = array()) {
$css = $this
->loadCSSFiles($format);
$output = '<html><head>';
$output .= '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>';
$title = $r->title;
// Add inline styles
if ($css || isset($r->rpt_xml->head->style)) {
$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>' . $r->title . '</title></head><body class="forena-report"><h1>' . $r->title . '</h1>' . $this
->check_markup($r->html) . '</body></html>';
return $output;
}