function getlocations_get_fieldname2 in Get Locations 7
Same name and namespace in other branches
- 7.2 getlocations.module \getlocations_get_fieldname2()
Function to collect field names
Parameters
string $bundle:
string $entity_type:
Return value
Returns field names or FALSE
16 calls to getlocations_get_fieldname2()
- 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_entity_type_map in modules/
getlocations_leaflet/ getlocations_leaflet.module - Function
- 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
File
- ./
getlocations.module, line 2491 - getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_get_fieldname2($bundle, $entity_type = 'node') {
$module = getlocations_get_current_supported_module();
if ($module) {
$query = db_select('field_config', 'f');
$query
->fields('f', array(
'field_name',
));
$query
->join('field_config_instance', 'i', 'f.id=i.field_id');
$query
->condition('i.bundle', $bundle)
->condition('f.module', $module)
->condition('i.entity_type', $entity_type)
->condition('f.active', 1);
$rows = $query
->execute();
$ct = 0;
foreach ($rows as $row) {
$data[$ct] = $row->field_name;
$ct++;
}
if ($ct) {
return $data;
}
}
return FALSE;
}