public function LingotekInterfaceTranslationService::setLastUploaded in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 4.0.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setLastUploaded()
- 3.4.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setLastUploaded()
- 3.5.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setLastUploaded()
- 3.7.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setLastUploaded()
- 3.8.x src/LingotekInterfaceTranslationService.php \Drupal\lingotek\LingotekInterfaceTranslationService::setLastUploaded()
Updates the 'initial upload' 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::setLastUploaded
1 call to LingotekInterfaceTranslationService::setLastUploaded()
- LingotekInterfaceTranslationService::uploadDocument in src/
LingotekInterfaceTranslationService.php - Uploads a document to the Lingotek service.
File
- src/
LingotekInterfaceTranslationService.php, line 1058
Class
- LingotekInterfaceTranslationService
- Service for managing Lingotek interface translations.
Namespace
Drupal\lingotekCode
public function setLastUploaded($component, int $timestamp) {
$metadata = $this
->getMetadata($component);
$metadata['uploaded_timestamp'] = $timestamp;
$this
->saveMetadata($component, $metadata);
return $component;
}