1 system.module system_menu()

Implements hook_menu().

File

core/modules/system/system.module, line 566
Configuration system that lets administrators modify the workings of the site.

Code

function system_menu() {
  $items['system/files'] = array(
    'title' => 'File download',
    'page callback' => 'file_download',
    'page arguments' => array('private'),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['system/temporary'] = array(
    'title' => 'Temporary files',
    'page callback' => 'file_download',
    'page arguments' => array('temporary'),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['system/ajax'] = array(
    'title' => 'AJAX callback',
    'page callback' => 'ajax_form_callback',
    'delivery callback' => 'ajax_deliver',
    'access callback' => TRUE,
    'theme callback' => 'ajax_base_page_theme',
    'type' => MENU_CALLBACK,
    'file path' => 'core/includes',
    'file' => 'form.inc',
  );
  $items['system/timezone'] = array(
    'title' => 'Time zone',
    'page callback' => 'system_timezone',
    'delivery callback' => 'backdrop_json_deliver',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );
  $items['system/404'] = array(
    'title' => 'Page not found',
    'page callback' => 'system_404',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['system/403'] = array(
    'title' => 'Access denied',
    'page callback' => 'system_403',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['path-autocomplete'] = array(
    'title' => 'Path autocomplete',
    'page callback' => 'path_autocomplete',
    'access callback' => 'user_access',
    'access arguments' => array('access content'),
    'type' => MENU_CALLBACK,
  );

  $items['admin'] = array(
    'title' => 'Administration',
    'access arguments' => array('access administration pages'),
    'page callback' => 'system_admin_menu_block_page',
    'weight' => 9,
    'menu_name' => 'management',
    'file' => 'system.admin.inc',
  );
  $items['admin/tasks'] = array(
    'title' => 'Tasks',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -20,
  );
  $items['admin/index'] = array(
    'title' => 'Index',
    'page callback' => 'system_admin_index',
    'access arguments' => array('access administration pages'),
    'type' => MENU_LOCAL_TASK,
    'weight' => -18,
    'file' => 'system.admin.inc',
  );

  // Menu items that are basically just menu blocks.
  $items['admin/structure'] = array(
    'title' => 'Structure',
    'icon' => 'stack-fill',
    'description' => 'Administer blocks, content types, menus, etc.',
    'weight' => -2,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  // Appearance.
  $items['admin/appearance'] = array(
    'title' => 'Appearance',
    'icon' => 'palette-fill',
    'description' => 'Select and configure themes.',
    'page callback' => 'system_themes_page',
    'access arguments' => array('administer themes'),
    'weight' => -4,
    'file' => 'system.admin.inc',
  );
  $items['admin/appearance/list'] = array(
    'title' => 'List themes',
    'description' => 'Select and configure themes.',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -1,
    'file' => 'system.admin.inc',
  );
  $items['admin/appearance/enable'] = array(
    'title' => 'Enable theme',
    'page callback' => 'system_theme_enable',
    'access arguments' => array('administer themes'),
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );
  $items['admin/appearance/disable'] = array(
    'title' => 'Disable theme',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_theme_disable_confirm'),
    'access arguments' => array('administer themes'),
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );
  $items['admin/appearance/default'] = array(
    'title' => 'Set default theme',
    'page callback' => 'system_theme_default',
    'access arguments' => array('administer themes'),
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );

  foreach (list_themes() as $key => $theme) {
    // Only provide pages for themes with settings.
    if (theme_has_settings($key)) {
      $items['admin/appearance/settings/' . $theme->name] = array(
        'title' => $theme->info['name'] . ' settings',
        'page callback' => 'backdrop_get_form',
        'page arguments' => array('system_theme_settings', $theme->name),
        'access callback' => '_system_themes_access',
        'access arguments' => array($key),
        'file' => 'system.admin.inc',
        'weight' => 20,
      );
    }
  }

  // Modules.
  $items['admin/modules'] = array(
    'title' => 'Functionality',
    'icon' => 'puzzle-piece-fill',
    'description' => 'Install or uninstall modules.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_modules'),
    'access arguments' => array('administer modules'),
    'file' => 'system.admin.inc',
    'weight' => -3,
  );
  $items['admin/modules/list'] = array(
    'title' => 'List modules',
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/modules/list/confirm'] = array(
    'title' => 'List modules',
    'access arguments' => array('administer modules'),
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
  );
  $items['admin/modules/uninstall'] = array(
    'title' => 'Uninstall modules',
    'page arguments' => array('system_modules_uninstall'),
    'access arguments' => array('administer modules'),
    'type' => MENU_LOCAL_TASK,
    'file' => 'system.admin.inc',
    'weight' => 20,
  );
  $items['admin/modules/uninstall/confirm'] = array(
    'title' => 'Uninstall modules',
    'access arguments' => array('administer modules'),
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
    'file' => 'system.admin.inc',
  );

  // Configuration.
  $items['admin/config'] = array(
    'title' => 'Configuration',
    'icon' => 'gear-fill',
    'description' => 'Administer settings.',
    'page callback' => 'system_admin_config_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/administration'] = array(
    'title' => 'Administration',
    'icon' => 'gear',
    'description' => 'Administration tools.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  // Media settings.
  $items['admin/config/media'] = array(
    'title' => 'Media',
    'icon' => 'image',
    'description' => 'Media tools.',
    'weight' => -10,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/media/file-system'] = array(
    'title' => 'File system',
    'description' => 'Tell Backdrop where to store uploaded files and how they are accessed.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_file_system_settings'),
    'access arguments' => array('administer site configuration'),
    'weight' => -10,
    'file' => 'system.admin.inc',
  );
  $items['admin/config/media/file-system/transliteration'] = array(
    'title' => 'Transliteration',
    'description' => 'Convert existing file names to US-ASCII.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_transliteration_retroactive'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
  );
  $items['admin/config/media/image-toolkit'] = array(
    'title' => 'Image toolkit',
    'description' => 'Choose which image toolkit to use if you have installed optional toolkits.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_image_toolkit_settings'),
    'access arguments' => array('administer site configuration'),
    'weight' => 20,
    'file' => 'system.admin.inc',
  );

  // Service settings.
  $items['admin/config/services'] = array(
    'title' => 'Web services',
    'icon' => 'rss',
    'description' => 'Tools related to web services.',
    'weight' => 0,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/services/rss-publishing'] = array(
    'title' => 'RSS publishing',
    'description' => 'Configure the site description, the number of items per feed and whether feeds should be titles/teasers/full-text.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_rss_feeds_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
  );

  // Development settings.
  $items['admin/config/development'] = array(
    'title' => 'Development',
    'icon' => 'wrench',
    'description' => 'Development tools.',
    'weight' => -10,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/development/maintenance'] = array(
    'title' => 'Maintenance mode',
    'description' => 'Take the site offline for maintenance or bring it back online.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_site_maintenance_mode'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
    'weight' => -10,
  );
  $items['admin/config/development/performance'] = array(
    'title' => 'Performance',
    'description' => 'Enable or disable page caching for anonymous users and set CSS and JS bandwidth optimization options.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_performance_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
    'weight' => -20,
  );
  $items['admin/config/development/logging'] = array(
    'title' => 'Logging and errors',
    'description' => "Settings for logging and alerts modules. Various modules can route Backdrop's system events to different destinations, such as syslog, database, email, etc.",
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_logging_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
    'weight' => -15,
  );
  $items['admin/config/development/jquery'] = array(
    'title' => 'jQuery',
    'description' => 'Configure settings related to the jQuery version.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_jquery_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
    'weight' => -10,
  );
  $items['admin/config/development/utf8mb4-upgrade'] = array(
    'title' => 'Database 4 byte UTF-8 upgrade',
    'description' => 'Upgrades the database to support 4 byte UTF-8 characters such as emoji and mathematical symbols.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_utf8mb4_convert_form'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
  );

  // Regional and date settings.
  $items['admin/config/regional'] = array(
    'title' => 'Regional and language',
    'icon' => 'globe',
    'description' => 'Regional settings, localization and translation.',
    'weight' => -5,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/settings'] = array(
    'title' => 'Regional settings',
    'description' => "Settings for the site's default time zone and country.",
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_regional_settings'),
    'access arguments' => array('administer site configuration'),
    'weight' => -20,
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time'] = array(
    'title' => 'Date and time formats',
    'description' => 'Configure the display of date and time strings.',
    'page callback' => 'system_date_time_formats',
    'access arguments' => array('administer site configuration'),
    'weight' => -9,
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time/formats/add'] = array(
    'title' => 'Add date format',
    'description' => 'Allow users to add additional date formats.',
    'type' => MENU_LOCAL_ACTION,
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_configure_date_formats_form'),
    'access arguments' => array('administer site configuration'),
    'weight' => -10,
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time/formats/%system_date_format'] = array(
    'title' => 'Edit date format',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_configure_date_formats_form', 5),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time/formats/%system_date_format/edit'] = array(
    'title' => 'Edit',
    'description' => 'Allow users to edit a configured date format.',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/config/regional/date-time/formats/%system_date_format/delete'] = array(
    'title' => 'Delete date format',
    'description' => 'Allow users to delete a configured date format.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_date_delete_format_form', 5),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/regional/date-time/formats/lookup'] = array(
    'title' => 'Date and time lookup',
    'page callback' => 'system_date_time_lookup',
    'access arguments' => array('administer site configuration'),
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );

  // Search settings.
  $items['admin/config/search'] = array(
    'title' => 'Search',
    'icon' => 'magnifying-glass',
    'description' => 'Local site search settings.',
    'weight' => -10,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );

  // System settings.
  $items['admin/config/system'] = array(
    'title' => 'System',
    'icon' => 'hard-drives',
    'description' => 'General system related configuration.',
    'weight' => -20,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/system/site-information'] = array(
    'title' => 'Site information',
    'description' => 'Change site name, logo, favicon, slogan, email address, default home page, and number of posts per page, error pages.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_site_information_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
    'weight' => -20,
  );
  $items['admin/config/system/cron'] = array(
    'title' => 'Cron',
    'description' => 'Manage automatic site maintenance tasks.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_cron_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
    'weight' => 20,
  );

  // URL handling.
  $items['admin/config/urls'] = array(
    'title' => 'URL handling',
    'icon' => 'link',
    'description' => 'Settings related to URLs including URL aliases and URL redirects.',
    'weight' => -20,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/urls/settings'] = array(
    'title' => 'URL settings',
    'description' => 'General URL-related configuration for your site.',
    'page callback' => 'backdrop_get_form',
    'page arguments' => array('system_urls_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/urls/settings/check'] = array(
    'title' => 'Clean URL check',
    'page callback' => 'backdrop_json_output',
    'page arguments' => array(array('status' => TRUE)),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );

  // @deprecated: Remove backwards-compatibility redirect in 2.0.
  $items['admin/config/search/urls'] = array(
    'page callback' => 'system_redirect_deprecated_page',
    'page arguments' => array('admin/config/urls/settings'),
    'access arguments' => array('administer site configuration'),
    'type' => MENU_CALLBACK,
  );
  // @deprecated: Remove backwards-compatibility redirect in 2.0.
  $items['admin/config/search/clean-urls'] = array(
    'page callback' => 'system_redirect_deprecated_page',
    'page arguments' => array('admin/config/urls/settings'),
    'access arguments' => array('administer site configuration'),
    'type' => MENU_CALLBACK,
  );
  // @deprecated: Remove backwards-compatibility redirect in 2.0.
  $items['admin/config/search/urls/check'] = array(
    'page callback' => 'system_redirect_deprecated_page',
    'page arguments' => array('admin/config/urls/settings/check'),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );

  // Additional categories
  $items['admin/config/content'] = array(
    'title' => 'Content authoring',
    'icon' => 'note-pencil',
    'description' => 'Settings related to formatting and authoring content.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/metadata'] = array(
    'title' => 'Metadata',
    'icon' => 'code',
    'description' => 'Settings related to meta tags, and other data commonly used by search engines.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/user-interface'] = array(
    'title' => 'User interface',
    'icon' => 'app-window',
    'description' => 'Tools that enhance the user interface.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );
  $items['admin/config/workflow'] = array(
    'title' => 'Workflow',
    'icon' => 'path',
    'description' => 'Settings related to editorial workflow.',
    'weight' => 5,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access administration pages'),
    'file' => 'system.admin.inc',
  );

  // Reports.
  $items['admin/reports'] = array(
    'title' => 'Reports',
    'icon' => 'info-fill',
    'description' => 'View reports, updates, and errors.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array('access site reports'),
    'weight' => 5,
    'file' => 'system.admin.inc',
  );
  $items['admin/reports/status'] = array(
    'title' => 'Status report',
    'description' => "Get a status report about your site's operation and any detected problems.",
    'page callback' => 'system_status',
    'access arguments' => array('access site reports'),
    'weight' => -60,
    'file' => 'system.admin.inc',
  );
  $items['admin/reports/debug'] = array(
    'title' => 'Debug information',
    'description' => 'Get information about the site that can help with support requests and debugging.',
    'page callback' => 'system_debug_info',
    'access arguments' => array('access site reports'),
    'weight' => -50,
    'file' => 'system.admin.inc',
  );
  $items['admin/reports/status/run-cron'] = array(
    'title' => 'Run cron',
    'page callback' => 'system_run_cron',
    'access arguments' => array('administer site configuration'),
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );
  $items['admin/reports/status/php'] = array(
    'title' => 'PHP',
    'page callback' => 'system_php',
    'access arguments' => array('administer site configuration'),
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );

  // Default page for batch operations.
  $items['batch'] = array(
    'page callback' => 'system_batch_page',
    'access callback' => TRUE,
    'theme callback' => '_system_batch_theme',
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );

  // AJAX endpoint for the assembled token tree.
  $items['token/tree'] = array(
    'page callback' => 'system_token_output',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
    'file' => 'system.pages.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // AJAX endpoint for retrieving a token.
  $items['token-browser/token/%'] = array(
    'page callback' => 'system_token_browser',
    'page arguments' => array(2),
    'delivery callback' => 'system_token_browser_output',
    'access callback' => 'system_token_browser_access',
    'file' => 'system.pages.inc',
    'type' => MENU_CALLBACK,
  );

  // Machine names transliteration.
  $items['system/transliterate/%'] = array(
    'page callback' => 'system_transliterate_ajax',
    'page arguments' => array(2),
    'access callback' => 'system_transliterate_ajax_access',
    'type' => MENU_CALLBACK,
    'file' => 'system.admin.inc',
  );

  return $items;
}