You are here

class FrxHtmlDoc in Forena Reports 7.4

Same name and namespace in other branches
  1. 7.3 docformats/FrxHtmlDoc.inc \FrxHtmlDoc

@file FrxHtmlDoc Straight html document with no wrapping theme. @author davidmetzler

Hierarchy

Expanded class hierarchy of FrxHtmlDoc

1 string reference to 'FrxHtmlDoc'
forena_forena_document_types in ./forena.module
Self register document formats with Forena

File

docformats/FrxHtmlDoc.inc, line 8
FrxHtmlDoc Straight html document with no wrapping theme. @author davidmetzler

View source
class FrxHtmlDoc extends FrxDocument {
  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

Namesort descending Modifiers Type Description Overrides
FrxDocument::$allowDirectOutput public property
FrxDocument::$charset public property
FrxDocument::$content_type public property
FrxDocument::$format public property
FrxDocument::$print public property
FrxDocument::check_markup public function Wrapper function for check output to default the right type.
FrxDocument::convertCharset public function
FrxDocument::header public function 5
FrxDocument::loadCSSFiles public function
FrxDocument::output public function 7
FrxHtmlDoc::render public function Overrides FrxDocument::render