BuildsPresentationAndMeta
Presentation, locale, time zone, custom values, flags and the source of the invoice.
Part of InvoiceBuilder, which holds the state; use the builder, not the trait.
Table of Contents
Methods
- custom() : static
- Free data for templates (view model key meta.custom); the same key replaces the value.
- flag() : static
- Sets a flag that country packs evaluate (e.g. a small amount invoice in Germany).
- locale() : static
- Language of the invoice: labels, generated texts and the exemption texts of presets.
- presentation() : static
- Design of this invoice in PDF and HTML: a Presentation replaces it, an array changes single values (->presentation(['introText' => 'Thank you for your order.', 'showGrossPrices' => true])), a callable receives the current Presentation and returns the new one.
- source() : static
- Origin of the data, e.g. "shop" (view model key meta.source).
- timezone() : static
- Time zone for DateTimeInterface values and for the default issue date; call it before the date setters.
Methods
custom()
Free data for templates (view model key meta.custom); the same key replaces the value.
public
custom(string $key, mixed $value) : static
Parameters
- $key : string
- $value : mixed
Return values
staticflag()
Sets a flag that country packs evaluate (e.g. a small amount invoice in Germany).
public
flag(string $flag[, bool $enabled = true ]) : static
Parameters
- $flag : string
- $enabled : bool = true
Return values
staticlocale()
Language of the invoice: labels, generated texts and the exemption texts of presets.
public
locale(string $locale) : static
The locale of a render call wins; without both, the configured locale or the country default.
Parameters
- $locale : string
Return values
staticpresentation()
Design of this invoice in PDF and HTML: a Presentation replaces it, an array changes single values (->presentation(['introText' => 'Thank you for your order.', 'showGrossPrices' => true])), a callable receives the current Presentation and returns the new one.
public
presentation(Presentation|array<string, mixed>|callable(Presentation): Presentation $presentation) : static
Parameters
- $presentation : Presentation|array<string, mixed>|callable(Presentation): Presentation
Return values
staticsource()
Origin of the data, e.g. "shop" (view model key meta.source).
public
source(string $source) : static
Parameters
- $source : string
Return values
statictimezone()
Time zone for DateTimeInterface values and for the default issue date; call it before the date setters.
public
timezone(string $timezone) : static
Parameters
- $timezone : string