You are here

public function DefaultExchangerImporter::__construct in Commerce Exchanger 8

DefaultExchangerImporter constructor.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Drupal entity manager.

\Drupal\Core\State\StateInterface $state: Drupal state handler.

File

src/DefaultExchangerImporter.php, line 46

Class

DefaultExchangerImporter
Class DefaultExchangerImporter.

Namespace

Drupal\commerce_exchanger

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, StateInterface $state) {
  $this->providers = $entity_type_manager
    ->getStorage('commerce_exchange_rates')
    ->loadByProperties([
    'status' => TRUE,
  ]);
  $this->state = $state;
}