You are here

function taxonomy_edge_rebuild_edges_batch in Taxonomy Edge 7

Same name and namespace in other branches
  1. 8 taxonomy_edge.rebuild.inc \taxonomy_edge_rebuild_edges_batch()
  2. 6 taxonomy_edge.rebuild.inc \taxonomy_edge_rebuild_edges_batch()
  3. 7.2 taxonomy_edge.rebuild.inc \taxonomy_edge_rebuild_edges_batch()

Start batch job for rebuild of edges.

1 call to taxonomy_edge_rebuild_edges_batch()
taxonomy_edge_rebuild_page_confirm_submit in ./taxonomy_edge.admin.inc
Submit callback; rebuild tree.
1 string reference to 'taxonomy_edge_rebuild_edges_batch'
drush_taxonomy_edge_rebuild_edges in ./taxonomy_edge.drush.inc
Rebuild edges.

File

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

Code

function taxonomy_edge_rebuild_edges_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'),
    'init_message' => t('Rebuilding taxonomy edges'),
  );
  foreach ($vids as $vid) {
    $batch['operations'][] = array(
      'taxonomy_edge_rebuild_edges',
      array(
        $vid,
      ),
    );
  }
  batch_set($batch);
}