function backup_migrate_prune_menu in Backup and migrate prune 7
Same name and namespace in other branches
- 7.2 backup_migrate_prune.module \backup_migrate_prune_menu()
Implementation of hook_menu().
File
- ./
backup_migrate_prune.module, line 19 - Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (e.g. cache_*)
Code
function backup_migrate_prune_menu() {
$base_index = count(explode('/', BACKUP_MIGRATE_MENU_PATH));
$items[BACKUP_MIGRATE_MENU_PATH . '/prune'] = array(
'title' => 'Prune',
'description' => 'Administer your gardeners (workers that prune your backups).',
'page callback' => 'backup_migrate_menu_callback',
'page arguments' => array(
'',
'backup_migrate_ui_manual_prune_list',
TRUE,
),
'access arguments' => array(
'access backup and migrate',
),
'type' => MENU_LOCAL_TASK,
'weight' => 5,
);
$items[BACKUP_MIGRATE_MENU_PATH . '/prune/list'] = array(
'title' => 'Prune',
'description' => 'Administer your gardeners (workers that prune your backups).',
'page callback' => 'backup_migrate_menu_callback',
'page arguments' => array(
'',
'backup_migrate_ui_manual_prune_list',
TRUE,
),
'access arguments' => array(
'access backup and migrate',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 5,
);
$items[BACKUP_MIGRATE_MENU_PATH . '/prune/add'] = array(
'title' => 'Add a gardener',
'description' => 'Administer your gardeners (workers that prune your backups).',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'backup_migrate_prune_add_form',
),
'access arguments' => array(
'access backup and migrate',
),
'type' => MENU_LOCAL_ACTION,
'weight' => 2,
);
$items[BACKUP_MIGRATE_MENU_PATH . '/prune/edit/%'] = array(
'title' => 'Add a gardener',
'description' => 'Administer your gardeners (workers that prune your backups).',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'backup_migrate_prune_add_form',
$base_index + 2,
),
'access arguments' => array(
'access backup and migrate',
),
'type' => MENU_CALLBACK,
);
$items[BACKUP_MIGRATE_MENU_PATH . '/prune/delete/%'] = array(
'title' => 'Delete',
'description' => 'Delete the gardener.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'backup_migrate_prune_delete_gardener',
$base_index + 2,
),
'access arguments' => array(
'access backup and migrate',
),
'type' => MENU_CALLBACK,
);
$items[BACKUP_MIGRATE_MENU_PATH . '/prune/prune/%'] = array(
'title' => 'Prune the destination',
'description' => 'Prune the destination.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'backup_migrate_prune_prune_form',
$base_index + 2,
),
'access arguments' => array(
'access backup and migrate',
),
'type' => MENU_CALLBACK,
);
return $items;
}