You are here

function getlocations_get_vocabularies in Get Locations 7.2

Same name and namespace in other branches
  1. 7 getlocations.module \getlocations_get_vocabularies()

Function gets list of vocabularies

Return value

Returns array

2 calls to getlocations_get_vocabularies()
getlocations_fields_element_origin in modules/getlocations_fields/getlocations_fields.functions.inc
getlocations_mapquest_field_formatter_view in modules/getlocations_mapquest/getlocations_mapquest.module
Implements hook_field_formatter_view(). Build a renderable array for a field value.

File

./getlocations.module, line 2209
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

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