You are here

public function LocaleResolver::__construct in Currency 8.3

Constructs a new instance.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager:

\Drupal\Core\Language\LanguageManagerInterface $language_manager:

\Drupal\Core\Config\ConfigFactoryInterface $config_factory:

\Drupal\currency\EventDispatcherInterface $event_dispatcher:

File

src/LocaleResolver.php, line 59

Class

LocaleResolver
Gets the right locale for the environment.

Namespace

Drupal\currency

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, LanguageManagerInterface $language_manager, ConfigFactoryInterface $config_factory, EventDispatcherInterface $event_dispatcher) {
  $this->configFactory = $config_factory;
  $this->currencyLocaleStorage = $entity_type_manager
    ->getStorage('currency_locale');
  $this->eventDispatcher = $event_dispatcher;
  $this->languageManager = $language_manager;
}