You are here

function taxonomy_edge_rebuild_all_batch in Taxonomy Edge 8

Same name and namespace in other branches
  1. 6 taxonomy_edge.rebuild.inc \taxonomy_edge_rebuild_all_batch()
  2. 7 taxonomy_edge.rebuild.inc \taxonomy_edge_rebuild_all_batch()

Start batch job for rebuild of edges and order

2 calls to taxonomy_edge_rebuild_all_batch()
taxonomy_edge_modules_enabled in ./taxonomy_edge.module
Implements hook_modules_enabled().
taxonomy_edge_rebuild_page_confirm_submit in ./taxonomy_edge.admin.inc
Submit callback; rebuild tree.

File

./taxonomy_edge.rebuild.inc, line 43
This file contains the functions for reuilding various tables.

Code

function taxonomy_edge_rebuild_all_batch($vids) {
  $batch = array(
    'finished' => 'taxonomy_edge_rebuild_finished',
    'file' => drupal_get_path('module', 'taxonomy_edge') . '/taxonomy_edge.rebuild.inc',
    'title' => t('Rebuilding taxonomy edges and order'),
    'init_message' => t('Rebuilding taxonomy edges and order'),
  );
  foreach ($vids as $vid) {
    $batch['operations'][] = array(
      'taxonomy_edge_rebuild_edges',
      array(
        $vid,
      ),
    );
    $batch['operations'][] = array(
      'taxonomy_edge_rebuild_order',
      array(
        $vid,
      ),
    );
  }
  batch_set($batch);
}