function backup_migrate_item::get_menu_items

nittany7 crud.inc backup_migrate_item::get_menu_items()
mooc7 crud.inc backup_migrate_item::get_menu_items()

Get the menu items for manipulating this type.

1 call to backup_migrate_item::get_menu_items()
backup_migrate_destination::get_menu_items in modules/contrib/backup_migrate/includes/destinations.inc
Add the menu items specific to the destination type.
1 method overrides backup_migrate_item::get_menu_items()
backup_migrate_destination::get_menu_items in modules/contrib/backup_migrate/includes/destinations.inc
Add the menu items specific to the destination type.

File

modules/contrib/backup_migrate/includes/crud.inc, line 553
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() {
  $type = $this->type_name;
  $items[BACKUP_MIGRATE_MENU_PATH . '/' . $type] = array(
    'title' => ucwords($this->plural),
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array('crud', 'backup_migrate_crud_ui_list', TRUE),
    'access arguments' => array('administer backup and migrate'),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
  );
  $items[BACKUP_MIGRATE_MENU_PATH . '/' . $type . '/list'] = array(
    'title' => 'List !type',
    'title arguments' => array('!type' => t(ucwords($this->plural))),
    'weight' => 1,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items[BACKUP_MIGRATE_MENU_PATH . '/' . $type . '/list/add'] = array(
    'title' => 'Add !type',
    'title arguments' => array('!type' => t(ucwords($this->singular))),
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array('crud', 'backup_migrate_crud_ui_create', TRUE),
    'access arguments' => array('administer backup and migrate'),
    'weight' => 2,
    'type' => MENU_LOCAL_ACTION,
  );
  $items[BACKUP_MIGRATE_MENU_PATH . '/' . $type . '/list/delete'] = array(
    'title' => 'Delete !type',
    'title arguments' => array('!type' => t(ucwords($this->singular))),
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array('crud', 'backup_migrate_crud_ui_delete', TRUE),
    'access arguments' => array('administer backup and migrate'),
    'type' => MENU_CALLBACK,
  );
  $items[BACKUP_MIGRATE_MENU_PATH . '/' . $type . '/list/edit'] = array(
    'title' => 'Edit !type',
    'title arguments' => array('!type' => t(ucwords($this->singular))),
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array('crud', 'backup_migrate_crud_ui_edit', TRUE),
    'access arguments' => array('administer backup and migrate'),
    'type' => MENU_CALLBACK,
  );
  $items[BACKUP_MIGRATE_MENU_PATH . '/' . $type . '/list/export'] = array(
    'title' => 'Export !type',
    'title arguments' => array('!type' => t(ucwords($this->singular))),
    'page callback' => 'backup_migrate_menu_callback',
    'page arguments' => array('crud', 'backup_migrate_crud_ui_export', TRUE),
    'access arguments' => array('administer backup and migrate'),
    'type' => MENU_CALLBACK,
  );
  return $items;
}