You are here

function units_field_field_delete in Units of Measurement 7.2

Implements hook_field_delete().

File

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

Code

function units_field_field_delete($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']);
  }
}