You are here

function mvf_field_insert in Measured Value Field 7

Implements hook_field_insert().

File

./mvf.module, line 476
Define a field type of measured value.

Code

function mvf_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
  foreach ($field['settings']['meta_info'] as $subfield => $meta_info) {
    $mocked_field = mvf_field_mockup($field, $subfield);
    $mocked_instance = mvf_instance_mockup($field, $instance, $subfield);
    $function = $mocked_field['module'] . '_field_insert';
    if (function_exists($function)) {
      $function($entity_type, $entity, $mocked_field, $mocked_instance, $langcode, $items);
    }
  }
}