Extension

Type
Class
Namespace
craft\commerce\web\twig
Inherits
craft\commerce\web\twig\Extension » Twig_Extension
Implements
Twig_ExtensionInterface
Since
2.0

Class CommerceTwigExtension

View source

Public Methods

MethodDescription
commerceCurrency()Formats and optionally converts a currency amount into the supplied valid payment currency as per the rate setup in payment currencies.
getFilters()
getFunctions()
getName()
getNodeVisitors()
getOperators()
getTests()
getTokenParsers()
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

Arguments

Returns

string

Signature

public string commerceCurrency ( $amount, $currency, $convert = false, $format = true, $stripZeros = false )

getFilters()

Signature

public void getFilters ( )

getName()

Signature

public string getName ( )

jsonEncodeFiltered()

View source

Arguments

  • $input

Returns

string

Signature

public string jsonEncodeFiltered ( $input )

sanitize()

View source

Arguments

  • $input

Returns

integer, mixed

Signature

public static integer, mixed sanitize ( $input )