You are here

protected function LingotekInterfaceTranslationService::saveMetadata in Lingotek Translation 3.8.x

Same name and namespace in other branches
  1. 4.0.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
  2. 3.2.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
  3. 3.3.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
  4. 3.4.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
  5. 3.5.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
  6. 3.6.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
  7. 3.7.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
7 calls to LingotekInterfaceTranslationService::saveMetadata()
LingotekInterfaceTranslationService::clearTargetStatuses in src/LingotekInterfaceTranslationService.php
Clear the target statuses.
LingotekInterfaceTranslationService::setDocumentId in src/LingotekInterfaceTranslationService.php
Sets the Lingotek document id for a given component.
LingotekInterfaceTranslationService::setJobId in src/LingotekInterfaceTranslationService.php
Sets the job ID of a given component.
LingotekInterfaceTranslationService::setLastUpdated in src/LingotekInterfaceTranslationService.php
Updates the 'updated date' time metadata to the current request time.
LingotekInterfaceTranslationService::setLastUploaded in src/LingotekInterfaceTranslationService.php
Updates the 'initial upload' time metadata to the current request time.

... See full list

File

src/LingotekInterfaceTranslationService.php, line 127

Class

LingotekInterfaceTranslationService
Service for managing Lingotek interface translations.

Namespace

Drupal\lingotek

Code

protected function saveMetadata($component, $metadata) {
  $state = \Drupal::state();
  $translations_metadata = $state
    ->get('lingotek.interface_translations_metadata');
  if (!$translations_metadata) {
    $translations_metadata = [];
  }
  $translations_metadata[$component] = $metadata;
  $state
    ->set('lingotek.interface_translations_metadata', $translations_metadata);
}