API reference / Quittio \ Core \ View
ViewContext
final readonly class in quittio/core
Quittio\Core\View\ViewContext · Source
Everything the view model factory needs besides the invoice data.
Properties#
| Property | Type | Description |
|---|---|---|
$country readonly | ?CountryPack | |
$defaults readonly | ?Presentation | |
$formatter readonly | Formatter | |
$locale readonly | ?string | |
$logo readonly | ?ResolvedLogo | |
$options readonly | array<string, mixed> | e.g. girocode_amount (due|discounted), watermark |
$paymentQr readonly | ?PaymentQrGenerator | |
$profile readonly | ?Profile | |
$translator readonly | ?Translator |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->translator() |
__construct()#
public function __construct(
?string $locale = null,
?CountryPack $country = null,
?Profile $profile = null,
Formatter $formatter = new \Quittio\Core\View\IntlFormatter(),
?Translator $translator = null,
?PaymentQrGenerator $paymentQr = null,
?Presentation $defaults = null,
array<string, mixed> $options = [],
?ResolvedLogo $logo = null,
)| Parameter | Type | Description |
|---|---|---|
$locale | ?string = null | |
$country | ?CountryPack = null | |
$profile | ?Profile = null | |
$formatter | Formatter = new \Quittio\Core\View\IntlFormatter() | |
$translator | ?Translator = null | |
$paymentQr | ?PaymentQrGenerator = null | |
$defaults | ?Presentation = null | |
$options | array<string, mixed> = [] | e.g. girocode_amount (due|discounted), watermark |
$logo | ?ResolvedLogo = null |
translator()#
public function translator(): Translator- Returns
Translator