PHP Class WellCommerce\Bundle\CurrencyBundle\Twig\Extension\CurrencyExtension

Author: Adam Piotrowski ([email protected])
Inheritance: extends Twig_Extension, implements Twig_Extension_GlobalsInterface
Afficher le fichier Open project: wellcommerce/wellcommerce

Protected Properties

Свойство Type Description
$dataset WellCommerce\Component\DataSet\DataSetInterface
$helper WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface

Méthodes publiques

Méthode Description
__construct ( WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface $helper, WellCommerce\Component\DataSet\DataSetInterface $dataset ) Constructor
convertPrice ( float $price, null | string $baseCurrency = null, null | string $targetCurrency = null, integer $quantity = 1 ) : string Converts the given amount
formatPrice ( float $price, null | string $baseCurrency = null, null | string $targetCurrency = null, null | string $locale = null, $quantity = 1 ) : string Formats the given amount
getCurrencies ( ) : array Returns an array of currencies
getFunctions ( )
getName ( )

Method Details

__construct() public méthode

Constructor
public __construct ( WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface $helper, WellCommerce\Component\DataSet\DataSetInterface $dataset )
$helper WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface
$dataset WellCommerce\Component\DataSet\DataSetInterface

convertPrice() public méthode

Converts the given amount
public convertPrice ( float $price, null | string $baseCurrency = null, null | string $targetCurrency = null, integer $quantity = 1 ) : string
$price float
$baseCurrency null | string
$targetCurrency null | string
$quantity integer
Résultat string

formatPrice() public méthode

Formats the given amount
public formatPrice ( float $price, null | string $baseCurrency = null, null | string $targetCurrency = null, null | string $locale = null, $quantity = 1 ) : string
$price float
$baseCurrency null | string
$targetCurrency null | string
$locale null | string
Résultat string

getCurrencies() public méthode

Returns an array of currencies
public getCurrencies ( ) : array
Résultat array

getFunctions() public méthode

public getFunctions ( )

getName() public méthode

public getName ( )

Property Details

$dataset protected_oe property

protected DataSetInterface,WellCommerce\Component\DataSet $dataset
Résultat WellCommerce\Component\DataSet\DataSetInterface

$helper protected_oe property

protected CurrencyHelperInterface,WellCommerce\Bundle\CurrencyBundle\Helper $helper
Résultat WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface