You are here

function getlocations_get_machine_vocabularies in Get Locations 7

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

Function gets list of vocabulary machine names

Return value

Returns array

4 calls to getlocations_get_machine_vocabularies()
getlocations_leaflet_plugin_style::options_form in modules/getlocations_leaflet/views/getlocations_leaflet_plugin_style.inc
Options form
getlocations_leaflet_settings_form in modules/getlocations_leaflet/getlocations_leaflet.module
Function
getlocations_mapquest_plugin_style::options_form in modules/getlocations_mapquest/views/getlocations_mapquest_plugin_style.inc
Options form
getlocations_plugin_style_map::options_form in views/getlocations_plugin_style_map.inc
Provide a form to edit options for this plugin.

File

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

Code

function getlocations_get_machine_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->machine_name;
        }
      }
      return $options;
    }
  }
  return FALSE;
}