public function SmartlingTranslator::requestJobItemsTranslation in TMGMT Translator Smartling 8.2
Same name and namespace in other branches
- 8.4 src/Plugin/tmgmt/Translator/SmartlingTranslator.php \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator::requestJobItemsTranslation()
- 8 src/Plugin/tmgmt/Translator/SmartlingTranslator.php \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator::requestJobItemsTranslation()
- 8.3 src/Plugin/tmgmt/Translator/SmartlingTranslator.php \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator::requestJobItemsTranslation()
Requests the translation of a JobItem.
Parameters
JobItemInterface[] $job_items: The JobItem we want to translate.
Overrides ContinuousTranslatorInterface::requestJobItemsTranslation
File
- src/
Plugin/ tmgmt/ Translator/ SmartlingTranslator.php, line 439 - Contains \Drupal\tmgmt_smartling\Plugin\tmgmt\Translator\SmartlingTranslator.
Class
- SmartlingTranslator
- Smartling translator plugin.
Namespace
Drupal\tmgmt_smartling\Plugin\tmgmt\TranslatorCode
public function requestJobItemsTranslation(array $job_items) {
/** @var \Drupal\tmgmt\Entity\Job $job */
$job = reset($job_items)
->getJob();
foreach ($job_items as $job_item) {
//tmgmt_smartling_download_file($job_item->getJob());
$this
->requestTranslation($job_item
->getJob());
if ($job
->isContinuous()) {
$job_item
->active();
}
}
}