class HtmlDocument in Forena Reports 7.5
Hierarchy
- class \Drupal\forena\DocumentFormats\DocumentTypeBase
- class \Drupal\forena\DocumentFormats\HtmlDocument
Expanded class hierarchy of HtmlDocument
File
- src/
DocumentFormats/ HTMLDocument.php, line 9 - HtmlDocument Straight html document with no wrapping theme. @author davidmetzler
Namespace
Drupal\forena\DocumentFormatsView source
class HtmlDocument extends DocumentTypeBase {
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>' . $r->html . '</body></html>';
return $output;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DocumentTypeBase:: |
public | property | ||
DocumentTypeBase:: |
public | property | ||
DocumentTypeBase:: |
public | property | ||
DocumentTypeBase:: |
public | property | ||
DocumentTypeBase:: |
public | property | ||
DocumentTypeBase:: |
public | function | Wrapper function for check output to default the right type. | |
DocumentTypeBase:: |
public | function | ||
DocumentTypeBase:: |
public | function | 5 | |
DocumentTypeBase:: |
public | function | ||
DocumentTypeBase:: |
public | function | 7 | |
HtmlDocument:: |
public | function |
Overrides DocumentTypeBase:: |