You are here

function theme_taxonomy_list_vocabulary in Taxonomy List 6

Same name and namespace in other branches
  1. 5.2 taxonomy_list.module \theme_taxonomy_list_vocabulary()
  2. 5 taxonomy_list.module \theme_taxonomy_list_vocabulary()
  3. 6.2 taxonomy_list.module \theme_taxonomy_list_vocabulary()
  4. 7 taxonomy_list.module \theme_taxonomy_list_vocabulary()

Theme the vocabulary.

1 theme call to theme_taxonomy_list_vocabulary()
taxonomy_list_show in ./taxonomy_list.module
Show the category list

File

./taxonomy_list.module, line 422
List all terms in a vocabulary.

Code

function theme_taxonomy_list_vocabulary($vocabulary, $types = FALSE, $title = TRUE) {
  $output = '<div class="taxonomy-list-vocabulary">';
  if ($title) {
    $output .= '<div class="name">' . check_plain($vocabulary->name) . '</div>';
  }
  $output .= '<div class="description">' . decode_entities(check_markup($vocabulary->description)) . '</div>';
  if ($types) {
    $list = array_flip(array_intersect(array_flip(node_get_types('names')), $vocabulary->nodes));
    $output .= '<div class="node-types"><p>' . t('Used for content types') . ': ' . implode(', ', $list) . '</p></div>';
  }
  $output .= '</div>';
  return $output;
}