CurrencyManager
class CurrencyManager implements CurrencyManagerInterface, BasicEntityManagerInterface, JQGridInterface
Class CurrencyManager is injected as alligator.currency_manager service. CurrencyManager handles the logic for entity.
Traits
Properties
| protected CurrencyRepository | $repository | ||
| protected Client | $cache | ||
| protected Session | $session | ||
| protected array | $ratioList | ||
| protected array | $currencies |
Methods
No description
No description
No description
Get ratio for specified currencies
Convert the amount into the currencyCode given in parameter
Set default currency to cache
Set isDefault param to false to default currency
Update currency ratio for all currencies
Ger array of all currency signs
Get all currencies from database
Delete multiple currencies
Merge Currency. If currency is new default currency change currency ratio for other currencies
Get multiple currencies from database
Get currency ratio for specified code compared to default currency
Get currency ratio for specified currencies
Update all auto calculated currencies
Do simple conversion for specified amount
Get current currency code from session
Get ratio list
Details
in JQGridManagerTrait at line 26
mixed
searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 40
mixed
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 53
mixed
getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)
at line 63
__construct(CurrencyRepository $repository, mixed $cache, Session $session)
at line 73
float
getRelativeRatio(string $referenceCurrencyCode, string $currencyCode)
Get ratio for specified currencies
at line 93
Money
convert(Money $amount, string $currencyCode, $currencyRatio = null)
Convert the amount into the currencyCode given in parameter
at line 109
RatioStorage
saveCurrency(RatioStorage $currency)
Persist Currency
at line 133
setDefaultCurrencyToCache()
Set default currency to cache
at line 153
bool
changeCurrentDefaultCurrency()
Set isDefault param to false to default currency
at line 164
bool
updateCurrencyToNewDefault(double $defaultRatio)
Update currency ratio for all currencies
at line 173
array
getAllCurrencySign()
Ger array of all currency signs
at line 196
array
getAllCurrencies()
Get all currencies from database
at line 210
bool
deleteCurrencies(array $currenciesDB)
Delete multiple currencies
at line 223
RatioStorage
editCurrency(RatioStorage $ratioStorage)
Merge Currency. If currency is new default currency change currency ratio for other currencies
at line 264
array
getCurrenciesArray(array $currencies)
Get multiple currencies from database
at line 276
float|false
getCurrencyRatio(string $isoCode, string $provider = RatioStorageInterface::PROVIDER_GOOGLE)
Get currency ratio for specified code compared to default currency
at line 309
float|int
getCurrencyRatioForPair(string $isoFrom, string $isoTo)
Get currency ratio for specified currencies
at line 325
boolean
updateAutoCalculatedCurrencies()
Update all auto calculated currencies
at line 347
float|int
simpleConvertMoney(mixed $price, mixed $from, mixed $to)
Do simple conversion for specified amount
at line 365
mixed
getCurrentCurrency()
Get current currency code from session
at line 376
array
getRatioList(bool $force = false)
Get ratio list