function locale_config_batch_refresh_name

Same name in other branches
  1. 9 core/modules/locale/locale.bulk.inc \locale_config_batch_refresh_name()
  2. 10 core/modules/locale/locale.bulk.inc \locale_config_batch_refresh_name()
  3. 11.x core/modules/locale/locale.bulk.inc \locale_config_batch_refresh_name()

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

locale_config_batch_build()

1 string reference to 'locale_config_batch_refresh_name'
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 617

Code

function locale_config_batch_refresh_name(array $names, array $langcodes, &$context) {
    if (!isset($context['result']['stats']['config'])) {
        $context['result']['stats']['config'] = 0;
    }
    $context['result']['stats']['config'] += Locale::config()->updateConfigTranslations($names, $langcodes);
    foreach ($names as $name) {
        $context['result']['names'][] = $name;
    }
    $context['result']['langcodes'] = $langcodes;
    $context['finished'] = 1;
}

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