You are here

function ddf_field_delete_instance in Dynamic dependent fields 7

Implements hook_field_delete_instance().

File

./ddf.module, line 153

Code

function ddf_field_delete_instance($instance) {
  db_delete('ddf')
    ->condition('field_name', $instance['field_name'])
    ->condition('entity_type', $instance['entity_type'])
    ->condition('bundle', $instance['bundle'])
    ->execute();
  db_delete('ddf')
    ->condition('dependent_field_name', $instance['field_name'])
    ->condition('entity_type', $instance['entity_type'])
    ->condition('bundle', $instance['bundle'])
    ->execute();
}