You are here

function file_entity_generate_file_batch_info in File Entity (fieldable files) 7.2

Same name and namespace in other branches
  1. 7.3 file_entity.devel_generate.inc \file_entity_generate_file_batch_info()

Implements hook_batch_info().

1 call to file_entity_generate_file_batch_info()
file_entity_generate_file_form_submit in ./file_entity.devel_generate.inc
Implements hook_ID_form_submit().

File

./file_entity.devel_generate.inc, line 52
Devel generate integration for the File Entity module.

Code

function file_entity_generate_file_batch_info($count, array $file_types = array(), $delete = FALSE) {
  if (empty($file_types)) {
    $file_types = array_keys(file_entity_type_get_names());
  }
  if ($delete) {
    $operations[] = array(
      'file_entity_generate_file_batch_delete',
      array(
        $file_types,
      ),
    );
  }
  $operations[] = array(
    'file_entity_generate_file_batch_generate',
    array(
      $file_types,
      $count,
    ),
  );
  return array(
    'operations' => $operations,
    'finished' => 'file_entity_generate_file_batch_finished',
    'file' => drupal_get_path('module', 'file_entity') . '/file_entity.devel_generate.inc',
  );
}