PHP Class CakePdf\View\PdfView

Inheritance: extends Cake\View\View
Show file Open project: ceeram/cakepdf

Public Properties

Property Type Description
$layoutPath string The name of the layouts subfolder containing layouts for this View.
$pdfConfig array List of pdf configs collected from the associated controller.
$subDir string The subdirectory. PDF views are always in pdf.

Protected Properties

Property Type Description
$_renderer CakePdf\Pdf\CakePdf | null CakePdf Instance

Public Methods

Method Description
__construct ( Cake\Network\Request $request = null, Response $response = null, Cake\Event\EventManager $eventManager = null, array $viewOptions = [] ) Constructor
getFilename ( ) : string Get or build a filename for forced download
render ( string $view = null, string $layout = null ) : string Render a Pdf view.
renderer ( array $config = null ) : CakePdf Return CakePdf instance, optionally set engine to be used

Method Details

__construct() public method

Constructor
public __construct ( Cake\Network\Request $request = null, Response $response = null, Cake\Event\EventManager $eventManager = null, array $viewOptions = [] )
$request Cake\Network\Request Request instance.
$response Cake\Network\Response Response instance.
$eventManager Cake\Event\EventManager Event manager instance.
$viewOptions array View options. See View::$_passedVars for list of options which get set as class properties.

getFilename() public method

Get or build a filename for forced download
public getFilename ( ) : string
return string The filename

render() public method

Render a Pdf view.
public render ( string $view = null, string $layout = null ) : string
$view string The view being rendered.
$layout string The layout being rendered.
return string The rendered view.

renderer() public method

Return CakePdf instance, optionally set engine to be used
public renderer ( array $config = null ) : CakePdf
$config array Array of pdf configs. When empty CakePdf instance will be returned.
return CakePdf\Pdf\CakePdf

Property Details

$_renderer protected property

CakePdf Instance
protected CakePdf,CakePdf\Pdf|null $_renderer
return CakePdf\Pdf\CakePdf | null

$layoutPath public property

The name of the layouts subfolder containing layouts for this View.
public string $layoutPath
return string

$pdfConfig public property

List of pdf configs collected from the associated controller.
public array $pdfConfig
return array

$subDir public property

The subdirectory. PDF views are always in pdf.
public string $subDir
return string