Extension
- Type
- Class
- Namespace
- craft\commerce\web\twig
- Inherits
- craft\commerce\web\twig\Extension »
Twig\Extension\AbstractExtension - Since
- 2.0
Class CommerceTwigExtension
View source (opens new window)
# Public Methods
| Method | Description |
|---|---|
| commerceCurrency() | Formats and optionally converts a currency amount into the supplied valid payment currency as per the rate setup in payment currencies. |
| getFilters() | |
| getName() | |
| jsonEncodeFiltered() | |
| sanitize() |
# commerceCurrency()
Formats and optionally converts a currency amount into the supplied valid payment currency as per the rate setup in payment currencies.
View source (opens new window)
Arguments
$amount$currency$convert(boolean (opens new window))$format(boolean (opens new window))$stripZeros(boolean (opens new window))
Returns
# getFilters()
View source (opens new window)
# getName()
View source (opens new window)
Returns
# jsonEncodeFiltered()
View source (opens new window)
Arguments
$input
Returns
# sanitize()
View source (opens new window)
Arguments
$input
Returns
integer (opens new window), mixed