You are here

protected function LingotekInterfaceTranslationService::clearUploadProcessId in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 3.7.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::clearUploadProcessId()
  2. 3.8.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::clearUploadProcessId()

Clears the upload process id.

Parameters

string $component: The entity being imported.

1 call to LingotekInterfaceTranslationService::clearUploadProcessId()
LingotekInterfaceTranslationService::setSourceStatus in src/LingotekInterfaceTranslationService.php
Sets the translation status of a given component.

File

src/LingotekInterfaceTranslationService.php, line 1244

Class

LingotekInterfaceTranslationService
Service for managing Lingotek interface translations.

Namespace

Drupal\lingotek

Code

protected function clearUploadProcessId($component) {
  $state = \Drupal::state();
  $stored_process_ids = $state
    ->get('lingotek_import_process_ids', []);
  $parents = [
    'interface_translation',
    $component,
  ];
  NestedArray::unsetValue($stored_process_ids, $parents);
  $state
    ->set('lingotek_import_process_ids', $stored_process_ids);
}