You are here

function geocoder_field_widget_get_field_concat in Geocoder 7.2

Get field items and info

We always pass the full field-item array (with all columns) to the handler, but there is some preprocessing that we need to do for the special case of entity-labels and multi-field concatenation For these two special cases we "mock-up" a text-field and pass it back for geocoding

1 call to geocoder_field_widget_get_field_concat()
geocoder_field_widget_get_field_value in modules/geocoder_field/geocoder_field.module
Get a field's value based on geocoded data.

File

modules/geocoder_field/geocoder_field.module, line 420

Code

function geocoder_field_widget_get_field_concat($items) {

  // Check if we should concatenate
  $concat = '';
  foreach ($items as $item) {
    if (!empty($item['value'])) {
      $concat .= trim($item['value']) . ', ';
    }
  }
  $concat = trim($concat, ', ');
  $items = array(
    array(
      'value' => $concat,
    ),
  );
  return $items;
}