You are here

public static function GenerateBatch::createBatch in File Hash 8

Creates the batch definition.

Return value

array The batch definition.

3 calls to GenerateBatch::createBatch()
drush_filehash_generate in ./filehash.drush.inc
Drush callback for filehash-generate command.
FileHashCommands::generate in src/Commands/FileHashCommands.php
Generate hashes for existing files.
FileHashGenerateForm::submitForm in src/Form/FileHashGenerateForm.php
Form submission handler.

File

src/Batch/GenerateBatch.php, line 18

Class

GenerateBatch
Generates file hashes in bulk.

Namespace

Drupal\filehash\Batch

Code

public static function createBatch() {
  return [
    'operations' => [
      [
        '\\Drupal\\filehash\\Batch\\GenerateBatch::process',
        [],
      ],
    ],
    'finished' => '\\Drupal\\filehash\\Batch\\GenerateBatch::finished',
    'title' => t('Processing file hash batch'),
    'init_message' => t('File hash batch is starting.'),
    'progress_message' => t('Please wait...'),
    'error_message' => t('File hash batch has encountered an error.'),
  ];
}