locale_config_batch_update_components

locale_config_batch_update_components(array $options, array $langcodes = array(), array $components = array())

Builds a locale batch to refresh configuration.

Parameters

array $options: An array with options that can have the following elements:

  • 'finish_feedback': (optional) Whether or not to give feedback to the user when the batch is finished. Defaults to TRUE.

array $langcodes: (optional) Array of language codes. Defaults to all translatable languages.

array $components: (optional) Array of component lists indexed by type. If not present or it is an empty array, it will update all components.

Return value

array The batch definition.

File

core/modules/locale/locale.bulk.inc, line 534
Mass import-export and batch import functionality for Gettext .po files.

Code

function locale_config_batch_update_components(array $options, array $langcodes = array(), array $components = array()) {
  $langcodes = $langcodes ? $langcodes : array_keys(\Drupal::languageManager()->getLanguages());
  if ($langcodes && $names = Locale::config()->getComponentNames($components)) {
    return locale_config_batch_build($names, $langcodes, $options);
  }
}
doc_Drupal
2016-10-29 09:24:14
Comments
Leave a Comment

Please login to continue.