You are here

public function LingotekConfigTranslationService::setConfigLastUploaded in Lingotek Translation 3.4.x

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

Sets the timestamp for the last time the config was uploaded.

Parameters

\Drupal\config_translation\ConfigNamesMapper $mapper: The mapper for which we want to save the timestamp.

int $timestamp: The timestamp being saved.

Overrides LingotekConfigTranslationServiceInterface::setConfigLastUploaded

1 call to LingotekConfigTranslationService::setConfigLastUploaded()
LingotekConfigTranslationService::uploadConfig in src/LingotekConfigTranslationService.php
Uploads a document to the Lingotek service.

File

src/LingotekConfigTranslationService.php, line 1747

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

public function setConfigLastUploaded(ConfigNamesMapper $mapper, int $timestamp) {
  foreach ($mapper
    ->getConfigNames() as $config_name) {
    $metadata = LingotekConfigMetadata::loadByConfigName($config_name);
    $metadata
      ->setLastUploaded($timestamp)
      ->save();
  }
  return $mapper;
}