You are here

function background_batch_library in Background Process 8

Same name and namespace in other branches
  1. 7.2 background_batch/background_batch.module \background_batch_library()
  2. 7 background_batch/background_batch.module \background_batch_library()

Implements hook_library().

File

background_batch/background_batch.module, line 55
This module adds background processing to Drupals batch API.

Code

function background_batch_library() {
  $libraries = [];
  $libraries['background-process.batch'] = [
    'title' => 'Background batch API',
    'version' => '1.0.0',
    'js' => [
      drupal_get_path('module', 'background_batch') . '/js/batch.js' => [
        'group' => JS_DEFAULT,
        'cache' => FALSE,
      ],
    ],
    'dependencies' => [
      [
        'background_batch',
        'background-process.progress',
      ],
    ],
  ];
  $libraries['background-process.progress'] = [
    'title' => 'Background batch progress',
    'version' => VERSION,
    'js' => [
      drupal_get_path('module', 'background_batch') . '/js/progress.js' => [
        'group' => JS_DEFAULT,
        'cache' => FALSE,
      ],
    ],
  ];
  return $libraries;
}