function backup_migrate_menu in Backup and Migrate 7.3
Same name and namespace in other branches
- 8.2 backup_migrate.module \backup_migrate_menu()
- 8.3 backup_migrate.module \backup_migrate_menu()
- 5.2 backup_migrate.module \backup_migrate_menu()
- 5 backup_migrate.module \backup_migrate_menu()
- 6.3 backup_migrate.module \backup_migrate_menu()
- 6 backup_migrate.module \backup_migrate_menu()
- 6.2 backup_migrate.module \backup_migrate_menu()
- 7.2 backup_migrate.module \backup_migrate_menu()
Implements hook_menu().
File
- ./
backup_migrate.module, line 128 - Backup and restore databases for Drupal.
Code
function backup_migrate_menu() {
require_once dirname(__FILE__) . '/includes/crud.inc';
$items = array();
$items[BACKUP_MIGRATE_MENU_PATH] = array(
'title' => 'Backup and Migrate',
'description' => 'Backup/restore your database and files or migrate data to or from another Drupal site.',
'page callback' => 'backup_migrate_menu_callback',
'page arguments' => array(
'',
'backup_migrate_ui_manual_backup_quick',
TRUE,
),
'access arguments' => array(
'access backup and migrate',
),
'type' => MENU_NORMAL_ITEM,
);
$items[BACKUP_MIGRATE_MENU_PATH . '/export'] = array(
'title' => 'Backup',
'description' => 'Backup the database.',
'page callback' => 'backup_migrate_menu_callback',
'page arguments' => array(
'',
'backup_migrate_ui_manual_backup_quick',
TRUE,
),
'access arguments' => array(
'access backup and migrate',
),
'weight' => 0,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[BACKUP_MIGRATE_MENU_PATH . '/export/quick'] = array(
'title' => 'Quick Backup',
'description' => 'Backup the database.',
'page callback' => 'backup_migrate_menu_callback',
'page arguments' => array(
'',
'backup_migrate_ui_manual_backup_quick',
TRUE,
),
'access arguments' => array(
'perform backup',
),
'weight' => 0,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[BACKUP_MIGRATE_MENU_PATH . '/export/advanced'] = array(
'title' => 'Advanced Backup',
'description' => 'Backup the database.',
'page callback' => 'backup_migrate_menu_callback',
'page arguments' => array(
'',
'backup_migrate_ui_manual_backup_advanced',
TRUE,
),
'access arguments' => array(
'perform backup',
),
'weight' => 1,
'type' => MENU_LOCAL_TASK,
);
$items[BACKUP_MIGRATE_MENU_PATH . '/restore'] = array(
'title' => 'Restore',
'description' => 'Restore the database from a previous backup',
'page callback' => 'backup_migrate_menu_callback',
'page arguments' => array(
'',
'backup_migrate_ui_manual_restore',
TRUE,
),
'access arguments' => array(
'restore from backup',
),
'weight' => 1,
'type' => MENU_LOCAL_TASK,
);
$items[BACKUP_MIGRATE_MENU_PATH . '/backups'] = array(
'title' => 'Saved Backups',
'description' => 'Previously created backups',
'page callback' => 'backup_migrate_menu_callback',
'page arguments' => array(
'',
'backup_migrate_ui_saved_backups',
TRUE,
),
'access arguments' => array(
'access backup files',
),
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
// @todo This was removed because it was getting far too complicated for an
// abstraction. Exposing the actual schedules is more direct.
// @code
// $items[BACKUP_MIGRATE_MENU_PATH . '/schedule'] = array(
// 'title' => 'Schedule',
// 'description' => 'Schedule automatic backups',
// 'page callback' => 'backup_migrate_menu_callback',
// 'page arguments' => array('', 'backup_migrate_ui_schedule', TRUE),
// 'access arguments' => array('administer backup and migrate'),
// 'weight' => 3,
// 'type' => MENU_LOCAL_TASK,
// );
// @endcode
$items[BACKUP_MIGRATE_MENU_PATH . '/settings'] = array(
'title' => 'Settings',
'description' => 'Module settings.',
'page callback' => 'backup_migrate_menu_callback',
'page arguments' => array(
'crud',
'backup_migrate_crud_ui_list_all',
TRUE,
),
'access arguments' => array(
'administer backup and migrate',
),
'weight' => 4,
'type' => MENU_LOCAL_TASK,
);
$items[BACKUP_MIGRATE_MENU_PATH . '/settings/import'] = array(
'title' => 'Import',
'description' => 'Import backup and migrate settings.',
'page callback' => 'backup_migrate_menu_callback',
'page arguments' => array(
'crud',
'backup_migrate_crud_ui_import',
TRUE,
),
'access arguments' => array(
'administer backup and migrate',
),
'weight' => 10,
'type' => MENU_LOCAL_TASK,
);
$items[BACKUP_MIGRATE_MENU_PATH . '/settings-advanced'] = array(
'title' => 'Advanced settings',
'description' => 'Optional settings for Backup and Migrate module.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'backup_migrate_ui_advanced_settings_form',
),
'file' => 'backup_migrate.advanced_settings.inc',
'access arguments' => array(
'administer backup and migrate',
),
'weight' => 50,
'type' => MENU_LOCAL_TASK,
);
$items += backup_migrate_crud_menu();
return $items;
}