You are here

function entityqueue_subqueue_delete_form_submit in Entityqueue 7

Form submit handler.

See also

entityqueue_subqueue_delete_form()

File

includes/entityqueue.admin.inc, line 241
Administrative pages for Entity Queue.

Code

function entityqueue_subqueue_delete_form_submit($form, &$form_state) {
  $queue = $form['#queue'];
  $subqueue = $form['#subqueue'];
  $handler = entityqueue_get_handler($queue);
  if ($handler
    ->canDeleteSubqueue($subqueue)) {
    entity_delete('entityqueue_subqueue', $subqueue->subqueue_id);
  }
  $form_state['redirect'] = 'admin/structure/entityqueue/list/' . $queue->name . '/subqueues';
}