You are here

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

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

Clears the upload process id.

Parameters

\Drupal\Core\Config\Entity\ConfigEntityInterface $entity: The entity being imported.

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

File

src/LingotekConfigTranslationService.php, line 2073

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

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