You are here

function field_group_group_export_delete in Field Group 7

Same name and namespace in other branches
  1. 7.2 field_group.module \field_group_group_export_delete()

Delete a field group. This function is also called by ctools export when calls are made through ctools_export_crud_delete().

Parameters

$group: A group definition.

$ctools_crud: Is this function called by the ctools crud delete.

1 call to field_group_group_export_delete()
field_group_delete_form_submit in ./field_group.field_ui.inc
Remove group from bundle.
1 string reference to 'field_group_group_export_delete'
field_group_schema in ./field_group.install
Implements hook_schema().

File

./field_group.module, line 1825
Fieldgroup module.

Code

function field_group_group_export_delete($group, $ctools_crud = TRUE) {
  $query = db_delete('field_group');
  if (isset($group->identifier)) {
    $query
      ->condition('identifier', $group->identifier);
    if (!$ctools_crud) {
      ctools_export_crud_disable('field_group', $group->identifier);
    }
  }
  elseif (isset($group->id)) {
    $query
      ->condition('id', $group->id);
  }
  if (!empty($group->mode)) {
    $query
      ->condition('mode', $group->mode);
  }
  $query
    ->execute();
  cache_clear_all('field_groups', 'cache_field');
  module_invoke_all('field_group_delete_field_group', $group);
}