function CurrentImportStorage::updateLastChecked

Updates the last checked time for an import.

Parameters

string $project: Project to update.

string $langcode: Langcode to update.

int $requestTime: The timestamp to check since.

1 call to CurrentImportStorage::updateLastChecked()
CurrentImportStorage::getOutdatedImports in core/modules/locale/src/CurrentImportStorage.php
Get projects due for an import check.

File

core/modules/locale/src/CurrentImportStorage.php, line 166

Class

CurrentImportStorage
Provides the locale current import state service.

Namespace

Drupal\locale

Code

protected function updateLastChecked(string $project, string $langcode, int $requestTime) : void {
  $this->database
    ->update('locale_file')
    ->fields([
    'last_checked' => $requestTime,
  ])
    ->condition('project', $project)
    ->condition('langcode', $langcode)
    ->execute();
  $this->memoryCache
    ->delete($this->getCacheId($project, $langcode));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.