PageDecorator
in package
FinalYes
Holds the optional per-page render hooks registered on a {@see Pdf} document: header, footer, and watermark closures.
Each closure has the signature function(PageContext $ctx): void and
is invoked once per page during a deferred render pass, after all
flow content has been placed but before the PDF bytes are generated.
Table of Contents
Properties
- $footer : Closure|null
- $header : Closure|null
- $watermark : Closure|null
Methods
- __construct() : mixed
- isEmpty() : bool
- withFooter() : self
- withHeader() : self
- withWatermark() : self
Properties
$footer read-only
public
Closure|null
$footer
= null
$header read-only
public
Closure|null
$header
= null
$watermark read-only
public
Closure|null
$watermark
= null
Methods
__construct()
public
__construct([Closure|null $header = null ][, Closure|null $footer = null ][, Closure|null $watermark = null ]) : mixed
Parameters
- $header : Closure|null = null
- $footer : Closure|null = null
- $watermark : Closure|null = null
isEmpty()
public
isEmpty() : bool
Return values
boolwithFooter()
public
withFooter(Closure|null $footer) : self
Parameters
- $footer : Closure|null
Return values
selfwithHeader()
public
withHeader(Closure|null $header) : self
Parameters
- $header : Closure|null
Return values
selfwithWatermark()
public
withWatermark(Closure|null $watermark) : self
Parameters
- $watermark : Closure|null