public function WordDocument::render in Forena Reports 7.5
Overrides DocumentTypeBase::render
File
- src/
DocumentFormats/ WordDocument.php, line 15 - WordDocument.inc Word document exporter. @author davidmetzler
Class
Namespace
Drupal\forena\DocumentFormatsCode
public function render($r, $format, $options = array()) {
$css = $this
->loadCSSFiles($format);
$output = '<html><head>';
$output .= '<meta http-equiv="Content-Type" content="text/html"/>';
if (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">' . $r->html . '</body></html>';
return $output;
}