Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/en/views.md
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,15 @@ use Cake\View\View;

class PdfView extends View
{
protected string $layoutPath = 'pdf';

protected string $subDir = 'pdf';

public static function contentType(): string
{
return 'application/pdf';
}

public function render(?string $view = null, ?string $layout = null): string
{
// Custom logic here.
Expand Down