function locale_config_batch_finished

locale_config_batch_finished($success, array $results)

Implements callback_batch_finished().

Finishes callback of system page locale import batch.

Parameters

bool $success: Information about the success of the batch import.

array $results: Information about the results of the batch import.

See also

locale_config_batch_build()

File

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

Code

function locale_config_batch_finished($success, array $results) {
  if ($success) {
    $configuration = isset($results['stats']['config']) ? $results['stats']['config'] : 0;
    if ($configuration) {
      drupal_set_message(t('The configuration was successfully updated. There are %number configuration objects updated.', array('%number' => $configuration)));
      \Drupal::logger('locale')->notice('The configuration was successfully updated. %number configuration objects updated.', array('%number' => $configuration));
    }
    else {
      drupal_set_message(t('No configuration objects have been updated.'));
      \Drupal::logger('locale')->warning('No configuration objects have been updated.');
    }
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!locale!locale.bulk.inc/function/locale_config_batch_finished/8.1.x