You are here

function backup_migrate_menu in Backup and Migrate 6.3

Same name and namespace in other branches
  1. 8.2 backup_migrate.module \backup_migrate_menu()
  2. 8.3 backup_migrate.module \backup_migrate_menu()
  3. 5.2 backup_migrate.module \backup_migrate_menu()
  4. 5 backup_migrate.module \backup_migrate_menu()
  5. 6 backup_migrate.module \backup_migrate_menu()
  6. 6.2 backup_migrate.module \backup_migrate_menu()
  7. 7.3 backup_migrate.module \backup_migrate_menu()
  8. 7.2 backup_migrate.module \backup_migrate_menu()

Implementation of hook_menu().

File

./backup_migrate.module, line 112
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_menu() {
  $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(
      'access backup and migrate',
    ),
    '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 and migrate',
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
  );
  $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,
  );
  $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,
  );
  backup_migrate_include('crud');
  $items += backup_migrate_crud_menu();
  return $items;
}