You are here

function vud_field_field_prepare_view in Vote Up/Down 7

Same name and namespace in other branches
  1. 7.2 vud_field/vud_field.module \vud_field_field_prepare_view()

Implements hook_field_prepare_view().

File

vud_field/vud_field.module, line 180
Defines field type which contains a voting widget.

Code

function vud_field_field_prepare_view($entity_type, $entities, $field, $instances, $langcode, &$items) {

  // If there is no values in $items, specify default value.
  foreach ($entities as $id => $entity) {
    if (empty($items[$id])) {
      $items[$id][0] = _vud_field_load($field, NULL, $instances[$id]);
    }
  }
}