You are here

function field_collection_item_delete_confirm_submit in Field collection 7

Submit callback for deleting a field collection item.

File

./field_collection.pages.inc, line 88
Provides the field collection item view / edit / delete pages.

Code

function field_collection_item_delete_confirm_submit($form, &$form_state) {
  $field_collection_item = $form_state['field_collection_item'];
  entity_delete('field_collection_item', $field_collection_item->item_id);
  drupal_set_message(t('%label has been deleted.', array(
    '%label' => drupal_ucfirst($field_collection_item
      ->label()),
  )));
  $form_state['redirect'] = '<front>';
}