function taxonomy_edge_form_taxonomy_overview_vocabularies_alter in Taxonomy Edge 6
Same name and namespace in other branches
- 8 taxonomy_edge.module \taxonomy_edge_form_taxonomy_overview_vocabularies_alter()
- 7.2 taxonomy_edge.module \taxonomy_edge_form_taxonomy_overview_vocabularies_alter()
- 7 taxonomy_edge.module \taxonomy_edge_form_taxonomy_overview_vocabularies_alter()
Hook into the overview of vocabularies to provide rebuild actions.
File
- ./
taxonomy_edge.module, line 265 - Selecting all children of a given taxonomy term can be a pain. This module makes it easier to do this, by maintaining a complete list of edges for each term using the adjecency matrix graph theory.
Code
function taxonomy_edge_form_taxonomy_overview_vocabularies_alter(&$form, &$form_state) {
if (user_access('administer taxonomy edge')) {
foreach (taxonomy_get_vocabularies() as $vocabulary) {
$form[$vocabulary->vid]['rebuild_edges'] = array(
'#value' => l('rebuild edges', "admin/content/taxonomy/rebuild/edges/{$vocabulary->vid}"),
);
$form[$vocabulary->vid]['rebuild_order'] = array(
'#value' => l('rebuild order', "admin/content/taxonomy/rebuild/order/{$vocabulary->vid}"),
);
$form[$vocabulary->vid]['rebuild_all'] = array(
'#value' => l('rebuild everything', "admin/content/taxonomy/rebuild/all/{$vocabulary->vid}"),
);
}
$form['#theme'] = 'taxonomy_edge_overview_vocabularies';
}
}