public function GlobalLinkTranslator::setTranslator in GlobalLink Connect for Drupal 8
Same name and namespace in other branches
- 8.2 src/Plugin/tmgmt/Translator/GlobalLinkTranslator.php \Drupal\globallink\Plugin\tmgmt\Translator\GlobalLinkTranslator::setTranslator()
Sets a Translator.
Parameters
\Drupal\tmgmt\TranslatorInterface $translator: The translator.
3 calls to GlobalLinkTranslator::setTranslator()
- GlobalLinkTranslator::abortTranslation in src/
Plugin/ tmgmt/ Translator/ GlobalLinkTranslator.php - Aborts a translation job.
- GlobalLinkTranslator::fetchJobs in src/
Plugin/ tmgmt/ Translator/ GlobalLinkTranslator.php - Fetches translations for job items of a given job.
- GlobalLinkTranslator::getSupportedLanguagePairs in src/
Plugin/ tmgmt/ Translator/ GlobalLinkTranslator.php - Default implementation that gets target languages for each remote language. This approach is ineffective and therefore it is advised that a plugin should provide own implementation.
File
- src/
Plugin/ tmgmt/ Translator/ GlobalLinkTranslator.php, line 94
Class
- GlobalLinkTranslator
- GlobalLink translation plugin controller.
Namespace
Drupal\globallink\Plugin\tmgmt\TranslatorCode
public function setTranslator(TranslatorInterface $translator) {
if (!isset($this->translator)) {
$this->translator = $translator;
}
}