You are here

function globallink_taxonomy_get_vocabulary_list in GlobalLink Connect for Drupal 7.7

Same name and namespace in other branches
  1. 7.5 globallink_taxonomy/globallink_taxonomy.inc \globallink_taxonomy_get_vocabulary_list()
  2. 7.6 globallink_taxonomy/globallink_taxonomy.inc \globallink_taxonomy_get_vocabulary_list()

Gets taxonomy vocabulary list.

Return value

array Array of taxonomy vocabulary.

1 call to globallink_taxonomy_get_vocabulary_list()
globallink_taxonomy_dashboard_filter_form in globallink_taxonomy/globallink_taxonomy_send.inc
Builds form to filter taxonomies to send for translation on dashboard.

File

globallink_taxonomy/globallink_taxonomy.inc, line 761

Code

function globallink_taxonomy_get_vocabulary_list() {
  $v_arr = array(
    '[any]' => 'Any',
  );
  $arr = array();
  $vocabs = taxonomy_vocabulary_load_multiple(FALSE);
  foreach ($vocabs as $vocab) {
    if ($vocab->i18n_mode == I18N_MODE_LOCALIZE || $vocab->i18n_mode == I18N_MODE_TRANSLATE || $vocab->i18n_mode == I18N_MODE_ENTITY_TRANSLATION) {
      $arr[$vocab->vid] = $vocab->name;
    }
  }
  asort($arr);
  return $v_arr + $arr;
}