You are here

function mvf_field_load in Measured Value Field 7

Implements hook_field_load().

File

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

Code

function mvf_field_load($entity_type, $entities, $field, $instances, $langcode, &$items) {
  foreach ($field['settings']['meta_info'] as $subfield => $meta_info) {
    $mocked_field = mvf_field_mockup($field, $subfield);
    $mocked_instances = array();
    foreach ($instances as $k => $v) {
      $mocked_instances[$k] = mvf_instance_mockup($field, $v, $subfield);
    }
    $function = $mocked_field['module'] . '_field_load';
    if (function_exists($function)) {
      $function($entity_type, $entities, $mocked_field, $mocked_instances, $langcode, $items);
    }
  }
}