You are here

class FrxHtmlDoc in Forena Reports 7.3

Same name and namespace in other branches
  1. 7.4 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>' . $this
      ->check_markup($r->html) . '</body></html>';
    return $output;
  }
  public function output($output) {
    print $output;
    return TRUE;
  }

}

Members

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