You are here

function drush_taxonomy_entity_index_rebuild in Taxonomy Entity Index 7

Same name and namespace in other branches
  1. 8 taxonomy_entity_index.drush.inc \drush_taxonomy_entity_index_rebuild()

Clear cache raw command callback.

File

./taxonomy_entity_index.drush.inc, line 32
Clear all caches

Code

function drush_taxonomy_entity_index_rebuild() {
  $entity_info = entity_get_info();
  $operations = array();
  foreach ($entity_info as $type => $info) {
    $operations[] = array(
      'taxonomy_entity_index_reindex_entity_type',
      array(
        $type,
      ),
    );
  }
  $batch = array(
    'operations' => $operations,
    'finished' => 'taxonomy_entity_index_finished',
  );
  batch_set($batch);

  // Process the batch.
  $batch =& batch_get();
  $batch['progressive'] = FALSE;
  batch_process();
}