function queue_example_add_remove_form_clear_queue

Submit handler for clearing/deleting the queue.

Related topics

1 string reference to 'queue_example_add_remove_form_clear_queue'
queue_example_add_remove_form in queue_example/queue_example.module
Form generator for managing the queue.

File

queue_example/queue_example.module, line 273

Code

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