You are here

function lingotek_get_multifield_field in Lingotek Translation 7.7

Recovers multifield fields

1 call to lingotek_get_multifield_field()
lingotek_xml_fields in ./lingotek.util.inc

File

./lingotek.util.inc, line 3107
Utility functions.

Code

function lingotek_get_multifield_field($delta, $column_name, $field_language) {
  $current_field = NULL;
  foreach ($delta as $key => $value) {
    if (strpos($column_name, $key) !== FALSE) {
      $suffix = substr($column_name, strlen($key) + 1, strlen($column_name));
      $current_field = $delta[$key][$field_language][0][$suffix];
      break;
    }
  }
  return $current_field;
}