You are here

public function SmartlingTranslator::getApi in TMGMT Translator Smartling 8.2

Parameters

\Drupal\tmgmt\TranslatorInterface $translator:

string $api_type:

Return value

\Drupal\tmgmt_smartling\Smartling\SmartlingApi

2 calls to SmartlingTranslator::getApi()
SmartlingTranslator::isReadyForDownload in src/Plugin/tmgmt/Translator/SmartlingTranslator.php
Checks if file is ready for download.
SmartlingTranslator::requestTranslation in src/Plugin/tmgmt/Translator/SmartlingTranslator.php
@abstract

File

src/Plugin/tmgmt/Translator/SmartlingTranslator.php, line 270
Contains \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator.

Class

SmartlingTranslator
Smartling translator plugin.

Namespace

Drupal\tmgmt_smartling\Plugin\tmgmt\Translator

Code

public function getApi(TranslatorInterface $translator, $api_type = 'file') {
  $api_factory = Drupal::service('tmgmt_smartling.smartling_api_factory');
  return $api_factory::create($translator
    ->getSettings(), $api_type);
}