You are here

public function LingotekInterfaceTranslationService::setLastUpdated in Lingotek Translation 3.7.x

Same name and namespace in other branches
  1. 4.0.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setLastUpdated()
  2. 3.4.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setLastUpdated()
  3. 3.5.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setLastUpdated()
  4. 3.6.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setLastUpdated()
  5. 3.8.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setLastUpdated()

Updates the 'updated date' time metadata to the current request time.

Parameters

string $component: The component for which we want to update the timestamp.

int $timestamp: The timestamp we want to store.

Return value

string Returns the component which translations are saved.

Overrides LingotekInterfaceTranslationServiceInterface::setLastUpdated

1 call to LingotekInterfaceTranslationService::setLastUpdated()
LingotekInterfaceTranslationService::updateDocument in src/LingotekInterfaceTranslationService.php
Resends a document to the translation service.

File

src/LingotekInterfaceTranslationService.php, line 1158

Class

LingotekInterfaceTranslationService
Service for managing Lingotek interface translations.

Namespace

Drupal\lingotek

Code

public function setLastUpdated($component, int $timestamp) {
  $metadata = $this
    ->getMetadata($component);
  $metadata['updated_timestamp'] = $timestamp;
  $this
    ->saveMetadata($component, $metadata);
  return $component;
}