function _location_taxonomize_get_hierarchy in Location Taxonomize 7
Same name and namespace in other branches
- 7.2 location_taxonomize.inc \_location_taxonomize_get_hierarchy()
Returns the hierarchy configured for the current Location Vocabulary
Parameters
$assoc - whether to return an associative array (TRUE) or: keyed array (FALSE)
4 calls to _location_taxonomize_get_hierarchy()
- location_taxonomize_form in ./location_taxonomize.admin.inc 
- Location Taxonomize administration form
- location_taxonomize_process_loc in ./location_taxonomize.module 
- Determines if a location needs to be taxonomized. If so, it saves the appropriate terms Returns the number of terms added
- _location_taxonomize_init_var_longname in ./location_taxonomize.module 
- Initializes the longname fields variable
- _location_taxonomy_add_longname in ./location_taxonomize.module 
- Adds a longname field to a term
File
- ./location_taxonomize.inc, line 108 
- Some useful functions for Location taxonomize
Code
function _location_taxonomize_get_hierarchy($assoc = FALSE) {
  $vocab = variable_get('location_taxonomize_vocab');
  $fields = $vocab['fields'];
  $hierarchy = array();
  foreach ($fields as $key => $value) {
    if ($value) {
      if ($assoc) {
        $hierarchy[$key] = $key;
      }
      else {
        $hierarchy[] = $key;
      }
    }
  }
  return $hierarchy;
}