You are here

function getlocations_get_term_reference_fields in Get Locations 7

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

Function list of term reference fields

Return value

Returns array

3 calls to getlocations_get_term_reference_fields()
getlocations_leaflet_plugin_style::options_form in modules/getlocations_leaflet/views/getlocations_leaflet_plugin_style.inc
Options form
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 2645
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_get_term_reference_fields() {
  $module = 'taxonomy';
  $type = 'taxonomy_term_reference';
  $query = db_select('field_config', 'f');
  $query
    ->fields('f', array(
    'field_name',
  ));
  $query
    ->condition('f.module', $module)
    ->condition('f.type', $type)
    ->condition('f.active', 1);
  $rows = $query
    ->execute();
  $data = array();
  foreach ($rows as $row) {
    $data[$row->field_name] = $row->field_name;
  }
  return $data;
}