public function DocumentBase::header in Forena Reports 8
Default implementation to put in content type based headers.
Overrides DocumentInterface::header
2 calls to DocumentBase::header()
- Excel::header in src/
FrxPlugin/ Document/ Excel.php - Default implementation to put in content type based headers.
- XML::header in src/
FrxPlugin/ Document/ XML.php - Default implementation to put in content type based headers.
8 methods override DocumentBase::header()
- Drupal::header in src/
FrxPlugin/ Document/ Drupal.php - Default implementation to put in content type based headers.
- EmailMerge::header in src/
FrxPlugin/ Document/ EmailMerge.php - Default implementation to put in content type based headers.
- Excel::header in src/
FrxPlugin/ Document/ Excel.php - Default implementation to put in content type based headers.
- HTML::header in src/
FrxPlugin/ Document/ HTML.php - Default implementation to put in content type based headers.
- MPDF::header in forena_pdf/
src/ FrxPlugin/ Document/ MPDF.php - Default implementation to put in content type based headers.
File
- src/
FrxPlugin/ Document/ DocumentBase.php, line 48 - DocumentBase.inc Given a report, render the appropriate output given the document format. @author davidmetzler
Class
Namespace
Drupal\forena\FrxPlugin\DocumentCode
public function header() {
$this->write_buffer = '';
if ($this->content_type) {
$this->headers = [];
$this->headers['Content-Type'] = $this->content_type . ' ;charset=' . $this->charset;
$this->headers['Cache-Control'] = '';
$this->headers['Pragma'] = '';
//$file_name = basename($_GET['q']);
if ($this->file_name) {
$this->headers['Content-Disposition:'] = 'attachment; filename="' . $this->file_name . '"';
}
}
}