function field_test_field_storage_delete

Implements hook_field_storage_delete().

File

modules/field/tests/field_test.storage.inc, line 189

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_id']])) {
            $field = field_info_field_by_id($instance['field_id']);
            field_test_field_storage_purge($entity_type, $entity, $field, $instance);
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.