function getdirections_other_get_fieldname in Get Directions 7.2
1 call to getdirections_other_get_fieldname()
File
- ./
getdirections.module, line 1820 - Fetches google map directions.
Code
function getdirections_other_get_fieldname($type, $module, $entity_type = '') {
$query = db_select('field_config', 'fc');
$query
->fields('fc', array(
'field_name',
));
$query
->join('field_config_instance', 'i', 'fc.id = i.field_id');
$query
->condition('fc.module', $module);
$query
->condition('fc.type', $type);
$query
->condition('fc.active', 1);
$query
->condition('fc.storage_active', 1);
if (!empty($entity_type)) {
$query
->condition('i.entity_type', $entity_type);
}
$rows = $query
->execute();
$field_names = array();
foreach ($rows as $row) {
$field_names[] = $row->field_name;
}
return $field_names;
}