You are here

function entityreference_field_presave in Entity reference 7

Implements hook_field_presave().

Adds the target type to the field data structure when saving.

File

./entityreference.module, line 268
Entityreference primary module file.

Code

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

  // Invoke the behaviors.
  foreach (entityreference_get_behavior_handlers($field, $instance) as $handler) {
    $handler
      ->presave($entity_type, $entity, $field, $instance, $langcode, $items);
  }
}