class PriceExchangerCalculator in Commerce Currency Resolver 8
Class PriceExchangerCalculator.
@package Drupal\commerce_currency_resolver
Hierarchy
- class \Drupal\commerce_exchanger\AbstractExchangerCalculator implements ExchangerCalculatorInterface
- class \Drupal\commerce_currency_resolver\PriceExchangerCalculator
Expanded class hierarchy of PriceExchangerCalculator
1 string reference to 'PriceExchangerCalculator'
1 service uses PriceExchangerCalculator
File
- src/
PriceExchangerCalculator.php, line 12
Namespace
Drupal\commerce_currency_resolverView source
class PriceExchangerCalculator extends AbstractExchangerCalculator {
/**
* {@inheritdoc}
*/
public function getExchangerId() {
$resolver_exchanger_id = $this->configFactory
->get('commerce_currency_resolver.settings')
->get('currency_exchange_rates');
if (isset($this->providers[$resolver_exchanger_id]) && $this->providers[$resolver_exchanger_id]
->status()) {
return $this->providers[$resolver_exchanger_id]
->getExchangerConfigName();
}
return NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractExchangerCalculator:: |
protected | property | Config factory. | |
AbstractExchangerCalculator:: |
protected | property | Entity manager. | |
AbstractExchangerCalculator:: |
protected | property | List of providers. | |
AbstractExchangerCalculator:: |
protected | property | Drupal commerce price rounder service. | |
AbstractExchangerCalculator:: |
public | function |
Get all exchange rates. Overrides ExchangerCalculatorInterface:: |
|
AbstractExchangerCalculator:: |
public | function |
Preform currency conversion for prices. Overrides ExchangerCalculatorInterface:: |
|
AbstractExchangerCalculator:: |
public | function | DefaultExchangerCalculator constructor. | |
PriceExchangerCalculator:: |
public | function |
Return configuration file of active provider or NULL. Overrides ExchangerCalculatorInterface:: |