You are here

function globallink_get_config_fields in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.7 globallink.inc \globallink_get_config_fields()
  2. 7.6 globallink.inc \globallink_get_config_fields()

Gets config fields by content type.

Parameters

string $content_type: The desired content type.

Return value

array Array of config fields.

2 calls to globallink_get_config_fields()
globallink_entity_save_translated_entity_with_fields in globallink_entity/globallink_entity.inc
Saves translated entity with fields.
globallink_get_pending_fields in ./globallink.inc
Gets pending fields by content type.

File

./globallink.inc, line 713
Miscellaneous GlobalLink functions for node translations (non-entity).

Code

function globallink_get_config_fields($content_type) {
  $arr = array();
  $result = db_select('globallink_field_config', 'tf')
    ->fields('tf')
    ->condition('content_type', $content_type, '=')
    ->execute();
  foreach ($result as $row) {
    $arr[$row->field_name] = $row;
  }
  return $arr;
}