You are here

function health_menu in Health Status 7

Implements hook_menu().

File

./health.module, line 37
Contains the basic hooks and function used by the Health system.

Code

function health_menu() {

  // Health settings page for modifying generic functionality.
  $items['admin/config/system/health'] = array(
    'title' => 'Health settings',
    'description' => 'Manage your Health page and API settings.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'health_admin_settings_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'health.admin.inc',
  );

  // Health dashboard, for viewing how your site is doing.
  $items['admin/reports/health/dashboard'] = array(
    'title' => 'Health dashboard',
    'description' => 'View the health of your site over the past few days.',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'health_admin_dashboard_form',
    ),
    'access arguments' => array(
      'access health report',
    ),
    'file' => 'health.admin.inc',
  );

  // Health API callback.
  $items['health/api/%'] = array(
    'title' => 'Health API',
    'description' => 'Health API callback.',
    'type' => MENU_CALLBACK,
    'page callback' => 'health_api_callback',
    'page arguments' => array(
      2,
    ),
    'access callback' => 'health_api_access',
    'file' => 'health.service.inc',
  );
  return $items;
}