function getlocations_get_entity_types_by_module in Get Locations 7.2
Function
Return value
Returns
1 call to getlocations_get_entity_types_by_module()
- getlocations_get_locative_entity_types in ./
getlocations.module - Function
File
- ./
getlocations.module, line 6379 - getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_get_entity_types_by_module($module) {
$entity_types = array();
$query = db_select('field_config', 'f');
$query
->fields('i', array(
'entity_type',
));
$query
->join('field_config_instance', 'i', 'f.id=i.field_id');
$query
->condition('f.module', $module)
->condition('f.active', 1);
$rows = $query
->execute();
foreach ($rows as $row) {
$entity_types[$row->entity_type] = 1;
}
return array_keys($entity_types);
}