protected function TranslationRequestManager::updateExistingTranslationRequest in TMGMT Translator Smartling 8.4
Updates translation request.
Parameters
\Drupal\tmgmt\JobInterface $job:
array $translation_request:
Return value
bool
2 calls to TranslationRequestManager::updateExistingTranslationRequest()
- TranslationRequestManager::upsertTranslationRequest in src/
Smartling/ Submission/ TranslationRequestManager.php - Send jobs to Submission service.
- TranslationRequestManagerTested::updateExistingTranslationRequest in tests/
src/ Kernel/ TranslationRequestManagerTest.php - Updates translation request.
1 method overrides TranslationRequestManager::updateExistingTranslationRequest()
- TranslationRequestManagerTested::updateExistingTranslationRequest in tests/
src/ Kernel/ TranslationRequestManagerTest.php - Updates translation request.
File
- src/
Smartling/ Submission/ TranslationRequestManager.php, line 190
Class
- TranslationRequestManager
- Class TranslationRequestManager.
Namespace
Drupal\tmgmt_smartling\Smartling\SubmissionCode
protected function updateExistingTranslationRequest(JobInterface $job, array $translation_request) {
$update_submission_params = new UpdateTranslationSubmissionParams();
$update_submission_params
->setSubmitterName($this
->getSubmitterName($job))
->setCustomTranslationData([
'batch_uid' => $job
->getSetting('batch_uid'),
'batch_execute_on_job' => $job
->getSetting('batch_execute_on_job'),
])
->setState(TranslationSubmissionStates::STATE_NEW)
->setTranslationSubmissionUid($translation_request['translationSubmissions'][0]['translationSubmissionUid']);
$update_request_params = new UpdateTranslationRequestParams();
$update_request_params
->setTitle($job
->label())
->addTranslationSubmission($update_submission_params);
return $this->apiWrapper
->updateTranslationRequest($this
->getBucketName($job), $translation_request['translationRequestUid'], $update_request_params);
}