function taxonomy_edge_rebuild_page_confirm_submit in Taxonomy Edge 8
Same name and namespace in other branches
- 6 taxonomy_edge.admin.inc \taxonomy_edge_rebuild_page_confirm_submit()
- 7.2 taxonomy_edge.admin.inc \taxonomy_edge_rebuild_page_confirm_submit()
- 7 taxonomy_edge.admin.inc \taxonomy_edge_rebuild_page_confirm_submit()
Submit callback; rebuild tree.
File
- ./
taxonomy_edge.admin.inc, line 100 - Pages for taxonomy edge settings and more.
Code
function taxonomy_edge_rebuild_page_confirm_submit($form, &$form_state) {
$form_state['redirect'] = 'admin/structure/taxonomy';
module_load_include('rebuild.inc', 'taxonomy_edge');
if (!empty($form_state['values']['vocabulary']->vid)) {
$vids = array(
$form_state['values']['vocabulary']->vid,
);
}
else {
$vocabularies = taxonomy_vocabulary_load_multiple();
foreach ($vocabularies as $vocabulary) {
$vids[] = $vocabulary->vid;
}
}
switch ($form_state['values']['type']) {
case 'edges':
return taxonomy_edge_rebuild_edges_batch($vids);
case 'order':
return taxonomy_edge_rebuild_order_batch($vids);
case 'all':
return taxonomy_edge_rebuild_all_batch($vids);
}
}