function taxonomy_list_block in Taxonomy List 6.2
Same name and namespace in other branches
- 5.2 taxonomy_list.module \taxonomy_list_block()
- 5 taxonomy_list.module \taxonomy_list_block()
- 6 taxonomy_list.module \taxonomy_list_block()
Implementation of hook_block().
File
- ./
taxonomy_list.module, line 807 - List all terms in a vocabulary.
Code
function taxonomy_list_block($op = 'list', $delta = 0, $edit = array()) {
global $user;
switch ($op) {
case 'list':
$vocabularies = taxonomy_get_vocabularies();
foreach ($vocabularies as $vocabulary) {
$blocks[$vocabulary->vid]['info'] = t('Taxonomy List for !name', array(
'!name' => $vocabulary->name,
));
}
return $blocks;
case 'view':
// $delta is the vid.
// $block['content'] = taxonomy_list_show($delta, 'all', 'block', 1);
$tree = taxonomy_list_get_tree($delta);
$block['content'] = theme_taxonomy_list_block($tree);
return $block;
case 'configure':
$form = array();
return $form;
case 'save':
return;
}
// end switch($op)
}