function CurrentImportStorage::save
Saves the current import information to persistent storage.
Parameters
\Drupal\locale\CurrentImport $currentImport: CurrentImport representing the project just imported.
File
-
core/
modules/ locale/ src/ CurrentImportStorage.php, line 86
Class
- CurrentImportStorage
- Provides the locale current import state service.
Namespace
Drupal\localeCode
public function save(CurrentImport $currentImport) : void {
$this->database
->merge('locale_file')
->keys([
'project' => $currentImport->project,
'langcode' => $currentImport->langcode,
])
->fields([
'version' => $currentImport->version,
'timestamp' => $currentImport->timestamp,
'hash' => $currentImport->hash,
'last_checked' => $currentImport->last_checked,
])
->execute();
$this->memoryCache
->set($this->getCacheId($currentImport->project, $currentImport->langcode), $currentImport, Cache::PERMANENT, [
self::LOCALE_CURRENT_IMPORT_CACHE_TAG,
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.