function locale_translation_update_file_history
Same name and namespace in other branches
- 10 core/modules/locale/locale.module \locale_translation_update_file_history()
- 11.x core/modules/locale/locale.module \locale_translation_update_file_history()
- 9 core/modules/locale/locale.module \locale_translation_update_file_history()
- 8.9.x core/modules/locale/locale.module \locale_translation_update_file_history()
Updates the {locale_file} table.
Parameters
object $source: Object representing the project just imported.
Return value
int FALSE on failure. Otherwise SAVED_NEW or SAVED_UPDATED.
Deprecated
in drupal:11.4.0 and is removed from drupal:13.0.0. Use \Drupal::service(CurrentImportStorage::class)->save() instead.
See also
https://www.drupal.org/node/3037162
File
-
core/
modules/ locale/ locale.module, line 485
Code
function locale_translation_update_file_history($source) {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use \\Drupal::service(CurrentImportStorage::class)->save(). See https://www.drupal.org/node/3037162', E_USER_DEPRECATED);
\Drupal::service(CurrentImportStorage::class)->save(CurrentImport::createFromSource($source));
// The api returns void.
return SAVED_NEW;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.