You are here

function getlocations_get_vocabularies in Get Locations 7

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

Function gets list of vocabularies

Return value

Returns array

15 calls to getlocations_get_vocabularies()
getlocations_fields_element_origin in modules/getlocations_fields/getlocations_fields.functions.inc
getlocations_fields_field_formatter_view in modules/getlocations_fields/getlocations_fields.module
Implements hook_field_formatter_view(). Build a renderable array for a field value.
getlocations_get_markertypes in ./getlocations.module
Function to fetch list of markers
getlocations_leaflet_field_formatter_view in modules/getlocations_leaflet/getlocations_leaflet.module
Implements hook_field_formatter_view(). Build a renderable array for a field value.
getlocations_leaflet_plugin_style::options_form in modules/getlocations_leaflet/views/getlocations_leaflet_plugin_style.inc
Options form

... See full list

File

./getlocations.module, line 2585
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;
}