You are here

function getlocations_search_get_vocabularies in Get Locations 7

Same name and namespace in other branches
  1. 7.2 modules/getlocations_search/getlocations_search.module \getlocations_search_get_vocabularies()

Return value

array $options Returns list of vocabularies suitable for a dropdown

1 call to getlocations_search_get_vocabularies()
_getlocations_search_settings_form in modules/getlocations_search/getlocations_search.admin.inc

File

modules/getlocations_search/getlocations_search.module, line 1203
getlocations_search.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_search_get_vocabularies() {
  if (module_exists('taxonomy')) {
    $vocabularies = taxonomy_get_vocabularies();
    $options = array();
    if (count($vocabularies)) {
      foreach ($vocabularies as $vid => $vocabulary) {
        $options[$vid] = $vocabulary->name;
      }
      return $options;
    }
  }
  return FALSE;
}