You are here

function backup_migrate_item::get_menu_items in Backup and Migrate 8.3

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

Get the menu items for manipulating this type.

2 calls to backup_migrate_item::get_menu_items()
backup_migrate_destination::get_menu_items in includes/destinations.inc
Add the menu items specific to the destination type.
backup_migrate_schedule::get_menu_items in includes/schedules.inc
Get the menu items for manipulating this type.
2 methods override backup_migrate_item::get_menu_items()
backup_migrate_destination::get_menu_items in includes/destinations.inc
Add the menu items specific to the destination type.
backup_migrate_schedule::get_menu_items in includes/schedules.inc
Get the menu items for manipulating this type.

File

includes/crud.inc, line 844
CRUD functions for backup and migrate types (schedules, profiles etc.).

Class

backup_migrate_item
A base class for items which can be stored in the database, listed, edited, deleted etc.

Code

function get_menu_items() {
  $path = $this
    ->get_settings_path();
  $type = $this->type_name;
  $items[$path] = array(
    'title' => $this->title_plural,
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array(
      'crud',
      'backup_migrate_crud_ui_list',
      TRUE,
      $this->type_name,
    ),
    'access arguments' => array(
      'administer backup and migrate',
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
  );
  $items[$path . '/list'] = array(
    'title' => 'List !type',
    'title arguments' => array(
      '!type' => t($this->title_plural),
    ),
    'weight' => 1,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items[$path . '/add'] = array(
    'title' => 'Add !type',
    'title arguments' => array(
      '!type' => t($this->title_singular),
    ),
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array(
      'crud',
      'backup_migrate_crud_ui_create',
      TRUE,
      $this->type_name,
    ),
    'access arguments' => array(
      'administer backup and migrate',
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_ACTION,
  );
  $items[$path . '/delete'] = array(
    'title' => 'Delete !type',
    'title arguments' => array(
      '!type' => t($this->title_singular),
    ),
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array(
      'crud',
      'backup_migrate_crud_ui_delete',
      TRUE,
      $this->type_name,
    ),
    'access arguments' => array(
      'administer backup and migrate',
    ),
    'type' => MENU_CALLBACK,
  );
  $items[$path . '/edit'] = array(
    'title' => 'Edit !type',
    'title arguments' => array(
      '!type' => t($this->title_singular),
    ),
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array(
      'crud',
      'backup_migrate_crud_ui_edit',
      TRUE,
      $this->type_name,
    ),
    'access arguments' => array(
      'administer backup and migrate',
    ),
    'type' => MENU_CALLBACK,
  );
  $items[$path . '/export'] = array(
    'title' => 'Export !type',
    'title arguments' => array(
      '!type' => t($this->title_singular),
    ),
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array(
      'crud',
      'backup_migrate_crud_ui_export',
      TRUE,
      $this->type_name,
    ),
    'access arguments' => array(
      'administer backup and migrate',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}