public function LingotekConfigTranslationService::setLastUpdated in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setLastUpdated()
- 3.5.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setLastUpdated()
- 3.6.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setLastUpdated()
- 3.7.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setLastUpdated()
- 3.8.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::setLastUpdated()
Updates the 'updated date' time metadata to the current request time.
Parameters
\Drupal\Core\Config\Entity\ConfigEntityInterface $entity: The entity to which we want to save the timestamp.
int $timestamp: The timestamp we want to store.
Return value
\Drupal\Core\Config\Entity\ConfigEntityInterface Returns the entity for which timestamp is saved.
Overrides LingotekConfigTranslationServiceInterface::setLastUpdated
1 call to LingotekConfigTranslationService::setLastUpdated()
- LingotekConfigTranslationService::updateDocument in src/
LingotekConfigTranslationService.php - Resends a document to the translation service.
File
- src/
LingotekConfigTranslationService.php, line 1819
Class
- LingotekConfigTranslationService
- Service for managing Lingotek configuration translations.
Namespace
Drupal\lingotekCode
public function setLastUpdated(ConfigEntityInterface $entity, int $timestamp) {
$metadata = LingotekConfigMetadata::loadByConfigName($entity
->getEntityTypeId() . '.' . $entity
->id());
$metadata
->setLastUpdated($timestamp)
->save();
return $entity;
}