bulkdelete.module in Bulk Delete 7
Same filename and directory in other branches
Main file of the bulkdelete module.
This module will give you an easy UI to delete nodes by type. Use with care!
File
bulkdelete.moduleView source
<?php
/**
* @file
* Main file of the bulkdelete module.
*
* This module will give you an easy UI to delete nodes by type. Use with care!
*/
/**
* Implements hook_menu().
*/
function bulkdelete_menu() {
$items = array();
$items['admin/content/bulkdelete'] = array(
'title' => 'Bulk delete nodes',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'bulkdelete_form',
),
'access arguments' => array(
'administer nodes',
),
'type' => MENU_LOCAL_TASK,
'weight' => 11,
'file' => 'bulkdelete.admin.inc',
);
return $items;
}
/**
* Batch finish function.
*
* This function is called by the batch 'finished' parameter.
* The cache must not be cleared as the last batch operation,
* but after the batch is finished.
*
* @param bool $success
* Indicates if the batch was successfully finished.
* @param array $results
* The value of the results item from the context variable used in the batch
* processing.
* @param array $operations
* If the success parameter is false then this is a list of the operations
* that haven't completed yet.
*/
function _bulkdelete_batch_finished($success, array $results, array $operations) {
cache_clear_all();
$message = $success ? t('Bulkdelete performed successfully.') : t('Bulkdelete has not been finished successfully.');
watchdog('bulkdelete', $message);
drupal_set_message($message);
}
Functions
Name | Description |
---|---|
bulkdelete_menu | Implements hook_menu(). |
_bulkdelete_batch_finished | Batch finish function. |