You are here

function file_entity_delete_submit in File Entity (fieldable files) 7

Form submit handler for the Delete button on the media edit form.

1 string reference to 'file_entity_delete_submit'
file_entity_edit in ./file_entity.pages.inc
Form builder: Builds the edit file form.

File

./file_entity.pages.inc, line 163
Supports file operations including View, Edit, and Delete.

Code

function file_entity_delete_submit($form, &$form_state) {
  $fid = $form_state['values']['fid'];
  $destination = array();
  if (isset($_GET['destination'])) {
    $destination = drupal_get_destination();
    unset($_GET['destination']);
  }
  $form_state['redirect'] = array(
    'file/' . $fid . '/delete',
    array(
      'query' => $destination,
    ),
  );
}