1 field_test.storage.inc field_test_field_storage_delete($entity_type, $entity, $fields)

Implements hook_field_storage_delete().

File

core/modules/field/tests/field_test/field_test.storage.inc, line 188
Defines a field storage backend.

Code

function field_test_field_storage_delete($entity_type, $entity, $fields) {
  list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);

  // Note: reusing field_test_storage_purge(), like field_sql_storage.module
  // does, is highly inefficient in our case...
  foreach (field_info_instances($bundle) as $instance) {
    if (isset($fields[$instance['field_name']])) {
      $field = field_info_field($instance['field_name']);
      field_test_field_storage_purge($entity_type, $entity, $field, $instance);
    }
  }
}