You are here

function taxonomy_manager_voc_list in Taxonomy Manager 7

Same name and namespace in other branches
  1. 5 taxonomy_manager.module \taxonomy_manager_voc_list()
  2. 6.2 taxonomy_manager.admin.inc \taxonomy_manager_voc_list()
  3. 6 taxonomy_manager.admin.inc \taxonomy_manager_voc_list()

list of vocabularies, which link to Taxonomy Manager interface

1 string reference to 'taxonomy_manager_voc_list'
taxonomy_manager_menu in ./taxonomy_manager.module
Implements hook_menu().

File

./taxonomy_manager.admin.inc, line 18

Code

function taxonomy_manager_voc_list() {
  $output = l(t('Add new vocabulary'), 'admin/structure/taxonomy/add/vocabulary') . ' | ';
  $output .= l(t('Edit vocabulary settings'), 'admin/structure/taxonomy') . '<br /><br />';
  $vocabularies = taxonomy_get_vocabularies();
  $voc_list = array();
  foreach ($vocabularies as $vocabulary) {
    $voc_list[] = l($vocabulary->name, 'admin/structure/taxonomy_manager/voc/' . $vocabulary->machine_name, array(
      'attributes' => array(
        'title' => $vocabulary->description,
        'alt' => $vocabulary->description,
      ),
    ));
  }
  if (!count($voc_list)) {
    $voc_list[] = t('No Vocabularies available');
  }
  $output .= theme('item_list', array(
    'items' => $voc_list,
    'title' => t('Vocabularies'),
  ));
  return $output;
}