You are here

protected function LingotekConfigTranslationService::storeConfigUploadProcessId in Lingotek Translation 3.7.x

Same name and namespace in other branches
  1. 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::storeConfigUploadProcessId()
  2. 3.8.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::storeConfigUploadProcessId()

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 $mapper_id: The mapper being imported.

string $process_id: The process ID in the TMS.

2 calls to LingotekConfigTranslationService::storeConfigUploadProcessId()
LingotekConfigTranslationService::updateConfig in src/LingotekConfigTranslationService.php
Resends a document to the translation service.
LingotekConfigTranslationService::uploadConfig in src/LingotekConfigTranslationService.php
Uploads a document to the Lingotek service.

File

src/LingotekConfigTranslationService.php, line 2095

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

protected function storeConfigUploadProcessId($mapper_id, $process_id) {
  $state = \Drupal::state();
  $stored_process_ids = $state
    ->get('lingotek_import_process_ids', []);
  $parents = [
    'config_mapper',
    $mapper_id,
  ];
  NestedArray::setValue($stored_process_ids, $parents, $process_id);
  $state
    ->set('lingotek_import_process_ids', $stored_process_ids);
}