1 queue_example.module queue_example_add_remove_form_clear_queue($form, &$form_state)

Submit handler for clearing/deleting the queue.

Related topics

File

modules/examples/queue_example/queue_example.module, line 273
Examples demonstrating the Backdrop Queue API.

Code

function queue_example_add_remove_form_clear_queue($form, &$form_state) {
  $queue = BackdropQueue::get($form_state['values']['queue_name']);
  $queue->deleteQueue();
  backdrop_set_message(t('Deleted the @queue_name queue and all items in it', array('@queue_name' => $form_state['values']['queue_name'])));
}