PHP Класс WellCommerce\Bundle\CurrencyBundle\Twig\Extension\CurrencyExtension

Автор: Adam Piotrowski ([email protected])
Наследование: extends Twig_Extension, implements Twig_Extension_GlobalsInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$dataset WellCommerce\Component\DataSet\DataSetInterface
$helper WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface

Открытые методы

Метод Описание
__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 ( )

Описание методов

__construct() публичный Метод

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() публичный Метод

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
Результат string

formatPrice() публичный Метод

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
Результат string

getCurrencies() публичный Метод

Returns an array of currencies
public getCurrencies ( ) : array
Результат array

getFunctions() публичный Метод

public getFunctions ( )

getName() публичный Метод

public getName ( )

Описание свойств

$dataset защищенное свойство

protected DataSetInterface,WellCommerce\Component\DataSet $dataset
Результат WellCommerce\Component\DataSet\DataSetInterface

$helper защищенное свойство

protected CurrencyHelperInterface,WellCommerce\Bundle\CurrencyBundle\Helper $helper
Результат WellCommerce\Bundle\CurrencyBundle\Helper\CurrencyHelperInterface