PHP Class kartik\grid\controllers\ExportController

Inheritance: extends yii\web\Controller
Afficher le fichier Open project: kartik-v/yii2-grid

Méthodes publiques

Méthode Description
actionDownload ( ) : mixed Download the exported file

Méthodes protégées

Méthode 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 méthode

Download the exported file
public actionDownload ( ) : mixed
Résultat mixed

generatePDF() protected méthode

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
Résultat void

setHttpHeaders() protected méthode

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
Résultat void