You are here

function lingotek_assign_field_format in Lingotek Translation 7.6

1 call to lingotek_assign_field_format()
lingotek_process_entity_xml in ./lingotek.remote.inc

File

./lingotek.remote.inc, line 262

Code

function lingotek_assign_field_format(&$params, $source_field_data, $curr_field_data, $format_column_name, $entity_langcode) {
  $field_format = NULL;
  if (!empty($source_field_data[0]['format'])) {
    $field_format = $source_field_data[0]['format'];
  }
  elseif (!empty($curr_field_data[$entity_langcode][0]['format'])) {
    $field_format = $curr_field_data[$entity_langcode][0]['format'];
  }
  if (!empty($field_format)) {
    $format_db_field_name = $format_column_name;
    $params[$format_db_field_name] = $field_format;
  }
}