1 installer.module installer_menu()

Implements hook_menu().

File

core/modules/installer/installer.module, line 23
Handles installation and updates of contributed projects.

Code

function installer_menu() {
  $items = array();

  // Add the tabs for install and update on modules, themes, and layouts.
  $paths = array(
    'module' => 'admin/modules',
    'theme' => 'admin/appearance',
    'layout' => 'admin/structure/layouts',
  );
  foreach ($paths as $context => $path) {
    $items[$path . '/install'] = array(
      'page callback' => 'installer_browser_page',
      'page arguments' => array($context),
      'access callback' => 'installer_install_access',
      'weight' => 4,
      'type' => MENU_LOCAL_TASK,
      'file' => 'installer.pages.inc',
    );
    $items[$path . '/update'] = array(
      'page callback' => 'backdrop_get_form',
      'page arguments' => array('installer_manager_update_form', $context),
      'access callback' => 'installer_update_access',
      'weight' => 10,
      'type' => MENU_LOCAL_TASK,
      'file' => 'installer.manager.inc',
    );
  }

  // Add menu titles with += for the translation extractor.
  $items['admin/modules/install'] += array('title' => 'Install new modules');
  $items['admin/modules/update'] += array('title' => 'Update modules');

  $items['admin/appearance/install'] += array('title' => 'Install new themes');
  $items['admin/appearance/update'] += array('title' => 'Update themes');

  $items['admin/structure/layouts/install'] += array('title' => 'Install new layouts');
  $items['admin/structure/layouts/update'] += array('title' => 'Update layouts');

  $items['admin/installer/manual'] = array(
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('installer_manager_install_form'),
    'access callback' => 'installer_install_access',
    'access arguments' => array(),
    'weight' => 25,
    'type' => MENU_CALLBACK,
    'file' => 'installer.manager.inc',
  );
  $items['admin/update/ready'] = array(
    'title' => 'Ready to update',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('installer_manager_update_ready_form'),
    'access callback' => 'installer_install_access',
    'access arguments' => array(),
    'type' => MENU_CALLBACK,
    'file' => 'installer.manager.inc',
  );
  $items['admin/installer/bulk/%'] = array(
    'title' => 'Install by names',
    'description' => 'Install multiple projects by listing machine names.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('installer_browser_bulk_install_form', 3),
    'access callback' => 'installer_install_access',
    'file' => 'installer.pages.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/installer/project/%'] = array(
    'title' => 'Project details',
    'description' => 'Project details',
    'page callback' => 'installer_browser_project_display',
    'page arguments' => array(3),
    'access callback' => 'installer_install_access',
    'file' => 'installer.pages.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/installer/reset/%/%'] = array(
    'title' => 'Reset',
    'description' => 'Reset installer project list.',
    'page callback' => 'installer_browser_installation_reset',
    'page arguments' => array(3, 4),
    'access callback' => 'installer_install_access',
    'file' => 'installer.pages.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/installer/install/%'] = array(
    'title' => 'Install',
    'page callback' => 'installer_browser_installation_page',
    'page arguments' => array(3),
    'access callback' => 'installer_install_access',
    'type' => MENU_NORMAL_ITEM,
    'file' => 'installer.pages.inc',
  );
  $items['admin/installer/queue/%/%/%'] = array(
    'page callback' => 'installer_browser_install_queue_callback',
    'page arguments' => array(3, 4, 5),
    'access callback' => 'installer_install_access',
    'type' => MENU_CALLBACK,
    'file' => 'installer.pages.inc',
  );

  return $items;
}