public function CommerceCurrencyResolver::__construct in Commerce Currency Resolver 8
Constructs a new CommerceCurrencyResolver object.
Parameters
\Drupal\commerce_currency_resolver\CurrentCurrencyInterface $current_currency: The currency manager.
\Drupal\commerce_exchanger\ExchangerCalculatorInterface $price_exchanger: Price exchanger calculator.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Config factory.
File
- src/
Resolver/ CommerceCurrencyResolver.php, line 51
Class
- CommerceCurrencyResolver
- Returns a price and currency depending of language or country.
Namespace
Drupal\commerce_currency_resolver\ResolverCode
public function __construct(CurrentCurrencyInterface $current_currency, ExchangerCalculatorInterface $price_exchanger, ConfigFactoryInterface $config_factory) {
$this->currentCurrency = $current_currency;
$this->priceExchanger = $price_exchanger;
$this->configFactory = $config_factory;
}