You are here

function backup_migrate_destination::get_menu_items in Backup and Migrate 8.2

Same name and namespace in other branches
  1. 8.3 includes/destinations.inc \backup_migrate_destination::get_menu_items()
  2. 6.3 includes/destinations.inc \backup_migrate_destination::get_menu_items()
  3. 6.2 includes/destinations.inc \backup_migrate_destination::get_menu_items()
  4. 7.3 includes/destinations.inc \backup_migrate_destination::get_menu_items()
  5. 7.2 includes/destinations.inc \backup_migrate_destination::get_menu_items()

Add the menu items specific to the destination type.

Overrides backup_migrate_item::get_menu_items

File

includes/destinations.inc, line 915

Class

backup_migrate_destination
A base class for creating destinations.

Code

function get_menu_items() {
  $items = parent::get_menu_items();
  $items[BACKUP_MIGRATE_MENU_PATH . '/destination/list/files'] = array(
    'title' => 'Destination Files',
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array(
      'destinations',
      'backup_migrate_ui_destination_display_files',
      TRUE,
    ),
    'access arguments' => array(
      'access backup files',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items[BACKUP_MIGRATE_MENU_PATH . '/destination/deletefile'] = array(
    'title' => 'Delete File',
    'description' => 'Delete a backup file',
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array(
      'destinations',
      'backup_migrate_ui_destination_delete_file',
      TRUE,
    ),
    'access arguments' => array(
      'delete backup files',
    ),
    'type' => MENU_CALLBACK,
  );
  $items[BACKUP_MIGRATE_MENU_PATH . '/destination/restorefile'] = array(
    'title' => 'Restore from backup',
    'description' => 'Restore database from a backup file on the server',
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array(
      'destinations',
      'backup_migrate_ui_destination_restore_file',
      TRUE,
    ),
    'access arguments' => array(
      'restore from backup',
    ),
    'type' => MENU_CALLBACK,
  );
  $items[BACKUP_MIGRATE_MENU_PATH . '/destination/downloadfile'] = array(
    'title' => 'Download File',
    'description' => 'Download a backup file',
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array(
      'destinations',
      'backup_migrate_ui_destination_download_file',
      TRUE,
    ),
    'access arguments' => array(
      'access backup files',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}