You are here

public function LingotekFake::getUploadedTimestamp in Lingotek Translation 8.2

Same name and namespace in other branches
  1. 8 tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getUploadedTimestamp()
  2. 4.0.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getUploadedTimestamp()
  3. 3.0.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getUploadedTimestamp()
  4. 3.1.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getUploadedTimestamp()
  5. 3.2.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getUploadedTimestamp()
  6. 3.3.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getUploadedTimestamp()
  7. 3.4.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getUploadedTimestamp()
  8. 3.5.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getUploadedTimestamp()
  9. 3.6.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getUploadedTimestamp()
  10. 3.7.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getUploadedTimestamp()
  11. 3.8.x tests/modules/lingotek_test/src/LingotekFake.php \Drupal\lingotek_test\LingotekFake::getUploadedTimestamp()

Gets the last edited timestamp from Lingotek service.

Parameters

string $doc_id: The document id in Lingotek.

Return value

int The timestamp.

Overrides LingotekInterface::getUploadedTimestamp

File

tests/modules/lingotek_test/src/LingotekFake.php, line 378

Class

LingotekFake

Namespace

Drupal\lingotek_test

Code

public function getUploadedTimestamp($doc_id) {
  $timestamps = \Drupal::state()
    ->get('lingotek.upload_timestamps', []);
  $timestamp = isset($timestamps[$doc_id]) ? $timestamps[$doc_id] : NULL;
  return $timestamp;
}