protected function LingotekConfigTranslationService::storeUploadProcessId in Lingotek Translation 3.7.x
Same name and namespace in other branches
- 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::storeUploadProcessId()
- 3.8.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::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
\Drupal\Core\Config\Entity\ConfigEntityInterface $entity: The entity being imported.
string $process_id: The process ID in the TMS.
2 calls to LingotekConfigTranslationService::storeUploadProcessId()
- LingotekConfigTranslationService::updateDocument in src/
LingotekConfigTranslationService.php - Resends a document to the translation service.
- LingotekConfigTranslationService::uploadDocument in src/
LingotekConfigTranslationService.php - Uploads a document to the Lingotek service.
File
- src/
LingotekConfigTranslationService.php, line 2025
Class
- LingotekConfigTranslationService
- Service for managing Lingotek configuration translations.
Namespace
Drupal\lingotekCode
protected function storeUploadProcessId(ConfigEntityInterface $entity, $process_id) {
$state = \Drupal::state();
$stored_process_ids = $state
->get('lingotek_import_process_ids', []);
$parents = [
$entity
->getEntityTypeId(),
$entity
->id(),
];
NestedArray::setValue($stored_process_ids, $parents, $process_id);
$state
->set('lingotek_import_process_ids', $stored_process_ids);
}