DateLatteExtension
extends Extension
in package
FinalYes
Table of Contents
Properties
- $appContext : AppContext
- $priceFormatContext : PriceFormatContext
- $translator : ITranslator
Methods
- __construct() : mixed
- getFilters() : array<string|int, mixed>
- format() : string
- Returns an empty string for an empty or unreadable value so a template never fails on a missing date.
- resolveLocalization() : object|null
- Resolves the localization; the override (email or invoice in the customer language, {@see PriceFormatContext}) wins over the request localization, same order as {@see PriceLatteExtension}.
Properties
$appContext read-only
private
AppContext
$appContext
$priceFormatContext read-only
private
PriceFormatContext
$priceFormatContext
$translator read-only
private
ITranslator
$translator
Methods
__construct()
public
__construct(ITranslator $translator, AppContext $appContext, PriceFormatContext $priceFormatContext) : mixed
Parameters
- $translator : ITranslator
- $appContext : AppContext
- $priceFormatContext : PriceFormatContext
getFilters()
public
getFilters() : array<string|int, mixed>
Return values
array<string|int, mixed>format()
Returns an empty string for an empty or unreadable value so a template never fails on a missing date.
private
format(string|int|DateTimeInterface|null $date, string $format) : string
Parameters
- $date : string|int|DateTimeInterface|null
- $format : string
Return values
stringresolveLocalization()
Resolves the localization; the override (email or invoice in the customer language, {@see PriceFormatContext}) wins over the request localization, same order as {@see PriceLatteExtension}.
private
resolveLocalization() : object|null