You are here

function relation_endpoint_field_presave in Relation 7

Implements hook_field_presave().

File

./relation_endpoint.module, line 123
Relation endpoints field.

Code

function relation_endpoint_field_presave($entity_type, $entity, $field, $instance, $langcode, &$items) {

  // We need r_index here because EntityFieldQuery can't query on deltas.
  foreach ($items as $delta => &$item) {
    $item['r_index'] = $delta;
  }
}