function _taxonomy_menu_save_menu_links_batch in Taxonomy menu 7.2
Same name and namespace in other branches
- 8 taxonomy_menu.batch.inc \_taxonomy_menu_save_menu_links_batch()
Saves link items in a menu based on available taxonomy terms.
Parameters
$terms: A list of taxonomy term objects to build the menu items upon.
$menu_name: The machine name of the menu in which the menu links should be inserted.
3 calls to _taxonomy_menu_save_menu_links_batch()
- taxonomy_menu_menu_links_insert in ./
taxonomy_menu.module - Inserts menu links associated to a vocabulary.
- taxonomy_menu_menu_links_update in ./
taxonomy_menu.module - Updates menu links associated to a vocabulary.
- _taxonomy_menu_update_all_parents in ./
taxonomy_menu.module - Update all parent items.
File
- ./
taxonomy_menu.batch.inc, line 16 - Batch API Code.
Code
function _taxonomy_menu_save_menu_links_batch($terms, $menu_name) {
$batch = array(
'operations' => array(
array(
'_taxonomy_menu_save_menu_links_process',
array(
$terms,
$menu_name,
),
),
),
'finished' => '_taxonomy_menu_save_menu_links_finished',
'title' => t('Rebuilding Taxonomy menu'),
'init_message' => t('The menu items have been deleted, and are about to be regenerated.'),
'progress_message' => t('Import progress: Completed @current of @total operations.'),
'redirect' => 'admin/structure/taxonomy',
'error_message' => t('The Taxonomy menu creation process has encountered an error.'),
);
batch_set($batch);
}