protected function LingotekInterfaceTranslationService::saveMetadata in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 4.0.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
- 3.2.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
- 3.3.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
- 3.4.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
- 3.5.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
- 3.6.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::saveMetadata()
- 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.
File
- src/
LingotekInterfaceTranslationService.php, line 127
Class
- LingotekInterfaceTranslationService
- Service for managing Lingotek interface translations.
Namespace
Drupal\lingotekCode
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);
}