You are here

public function GlExchangeAdapter::__construct in GlobalLink Connect for Drupal 8

Same name and namespace in other branches
  1. 8.2 src/GlExchangeAdapter.php \Drupal\globallink\GlExchangeAdapter::__construct()

GlExchangeAdapter constructor.

File

src/GlExchangeAdapter.php, line 37

Class

GlExchangeAdapter
Provides an interface to the provided library.

Namespace

Drupal\globallink

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, ModuleHandlerInterface $module_handler_interface) {
  $this->entityTypeManager = $entity_type_manager;

  // @todo Handle multiple translators of the same type.
  $this->translator = $this->entityTypeManager
    ->getStorage('tmgmt_translator')
    ->load('globallink');
  $this->moduleHandler = $module_handler_interface;
}