You are here

function devel_generate_batch_finished in Devel 8

Same name and namespace in other branches
  1. 8.3 devel_generate/devel_generate.batch.inc \devel_generate_batch_finished()
  2. 8.2 devel_generate/devel_generate.batch.inc \devel_generate_batch_finished()
  3. 6 devel_generate_batch.inc \devel_generate_batch_finished()
  4. 7 devel_generate/devel_generate_batch.inc \devel_generate_batch_finished()
  5. 4.x devel_generate/devel_generate.batch.inc \devel_generate_batch_finished()

Common finish batch function available for every DevelGeneratePlugin.

1 string reference to 'devel_generate_batch_finished'
ContentDevelGenerate::generateBatchContent in devel_generate/src/Plugin/DevelGenerate/ContentDevelGenerate.php
Method responsible for creating content when the number of elements is greater than 50.

File

devel_generate/devel_generate.batch.inc, line 16

Code

function devel_generate_batch_finished($success, $results, $operations) {
  if ($success) {
    $message = t('Finished @num elements created successfully.', array(
      '@num' => $results['num'],
    ));
  }
  else {
    $message = t('Finished with an error.');
  }
  drupal_set_message($message);
}