You are here

function activity_batch_regenerate in Activity 7

Same name and namespace in other branches
  1. 6.2 activity.admin.inc \activity_batch_regenerate()

Set a batch process to regenerate activity for a specific hook and op pair.

Parameters

$action: ActivityActionHandler to create messages for.

Return value

none

1 string reference to 'activity_batch_regenerate'
activity_menu in ./activity.module
Implements hook_menu().

File

./activity.admin.inc, line 436
activity.admin.inc Contains administrative forms for activity.module

Code

function activity_batch_regenerate(ActivityActionHandler $action) {
  $batch = array(
    'title' => t('Creating @label messages', array(
      '@label' => $action->label,
    )),
    'operations' => array(
      array(
        'activity_batch_delete',
        array(
          $action->actions_id,
        ),
      ),
      array(
        'activity_batch_regenerate_step',
        array(
          $action->actions_id,
        ),
      ),
    ),
    'file' => drupal_get_path('module', 'activity') . '/activity.batch.inc',
  );
  batch_set($batch);
  batch_process('admin/structure/activity');
}