You are here

function units_field_field_delete_revision in Units of Measurement 7.2

Implements hook_field_delete_revision().

File

units_field/units_field.module, line 166
Provide field type for storing measured values.

Code

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

  // TODO: this should be replaced with a batch delete in a single SQL DELETE.
  foreach ($items as $item) {
    units_mathematical_expression_delete($item['mathematical_expression_id']);
  }
}