PHP Class kartik\grid\controllers\ExportController

Inheritance: extends yii\web\Controller
Datei anzeigen Open project: kartik-v/yii2-grid

Public Methods

Method Description
actionDownload ( ) : mixed Download the exported file

Protected Methods

Method Description
generatePDF ( string $content, string $filename, array $config = [] ) : void Generates the PDF file
setHttpHeaders ( string $type, string $name, string $mime, string $encoding = 'utf-8' ) : void Sets the HTTP headers needed by file download action.

Method Details

actionDownload() public method

Download the exported file
public actionDownload ( ) : mixed
return mixed

generatePDF() protected method

Generates the PDF file
protected generatePDF ( string $content, string $filename, array $config = [] ) : void
$content string the file content
$filename string the file name
$config array the configuration for yii2-mpdf component
return void

setHttpHeaders() protected method

Sets the HTTP headers needed by file download action.
protected setHttpHeaders ( string $type, string $name, string $mime, string $encoding = 'utf-8' ) : void
$type string the file type
$name string the file name
$mime string the mime time for the file
$encoding string the encoding for the file content
return void