function locale_config_batch_update_config_translations
Implements callback_batch_operation().
Performs configuration translation refresh.
Parameters
array $names: An array of names of configuration objects to update.
array $langcodes: (optional) Array of language codes to update. Defaults to all languages.
array|\ArrayAccess $context: Contains a list of files imported.
See also
1 call to locale_config_batch_update_config_translations()
- locale_config_batch_refresh_name in core/
modules/ locale/ locale.bulk.inc - Implements callback_batch_operation().
1 string reference to 'locale_config_batch_update_config_translations'
- locale_config_batch_build in core/
modules/ locale/ locale.bulk.inc - Creates a locale batch to refresh specific configuration.
File
-
core/
modules/ locale/ locale.bulk.inc, line 651
Code
function locale_config_batch_update_config_translations(array $names, array $langcodes, &$context) : void {
if (!isset($context['results']['stats']['config'])) {
$context['results']['stats']['config'] = 0;
}
$context['results']['stats']['config'] += \Drupal::service('locale.config_manager')->updateConfigTranslations($names, $langcodes);
foreach ($names as $name) {
$context['results']['names'][] = $name;
}
$context['results']['langcodes'] = $langcodes;
$context['finished'] = 1;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.