protected function LingotekInterfaceTranslationService::storeUploadProcessId in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 4.0.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::storeUploadProcessId()
- 3.7.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::storeUploadProcessId()
Stores the upload process id.
In case of 404, we need to know if there was an error, or it's just still importing.
Parameters
string $component: The entity being imported.
string $process_id: The process ID in the TMS.
2 calls to LingotekInterfaceTranslationService::storeUploadProcessId()
- LingotekInterfaceTranslationService::updateDocument in src/
LingotekInterfaceTranslationService.php - Resends a document to the translation service.
- LingotekInterfaceTranslationService::uploadDocument in src/
LingotekInterfaceTranslationService.php - Uploads a document to the Lingotek service.
File
- src/
LingotekInterfaceTranslationService.php, line 1196
Class
- LingotekInterfaceTranslationService
- Service for managing Lingotek interface translations.
Namespace
Drupal\lingotekCode
protected function storeUploadProcessId($component, $process_id) {
$state = \Drupal::state();
$stored_process_ids = $state
->get('lingotek_import_process_ids', []);
$parents = [
'interface_translation',
$component,
];
NestedArray::setValue($stored_process_ids, $parents, $process_id);
$state
->set('lingotek_import_process_ids', $stored_process_ids);
}