You are here

function globallink_get_configured_fields_for_file in GlobalLink Connect for Drupal 7.7

1 call to globallink_get_configured_fields_for_file()
globallink_get_file_entity_xml in globallink_file_entity/globallink_file_entity.inc

File

globallink_file_entity/globallink_file_entity.inc, line 175

Code

function globallink_get_configured_fields_for_file($file_type) {
  $result = db_select('globallink_field_config', 'gfc')
    ->fields('gfc')
    ->condition('content_type', 'file:' . $file_type, '=')
    ->condition('entity_type', 'file', '=')
    ->execute();
  $arr = array();
  foreach ($result as $row) {
    $arr[$row->field_name] = $row;
  }
  return $arr;
}