class DefaultExchangerCalculator in Commerce Exchanger 8
Hierarchy
- class \Drupal\commerce_exchanger\AbstractExchangerCalculator implements ExchangerCalculatorInterface
- class \Drupal\commerce_exchanger\DefaultExchangerCalculator
Expanded class hierarchy of DefaultExchangerCalculator
1 string reference to 'DefaultExchangerCalculator'
1 service uses DefaultExchangerCalculator
File
- src/
DefaultExchangerCalculator.php, line 5
Namespace
Drupal\commerce_exchangerView source
class DefaultExchangerCalculator extends AbstractExchangerCalculator {
/**
* {@inheritdoc}
*/
public function getExchangerId() {
// Return the first one.
foreach ($this->providers as $provider) {
if ($provider
->status()) {
return $provider
->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. | |
DefaultExchangerCalculator:: |
public | function |
Return configuration file of active provider or NULL. Overrides ExchangerCalculatorInterface:: |