You are here

function heartbeat_menu in Heartbeat 6.2

Same name and namespace in other branches
  1. 6.4 heartbeat.module \heartbeat_menu()
  2. 6.3 heartbeat.module \heartbeat_menu()
  3. 7 heartbeat.module \heartbeat_menu()

Implementation of hook_menu().

File

./heartbeat.module, line 222
To fully understand this, you have to be familiar with the rules module. Lots of documentation can be found on http://drupal.org/node/298480 for an introduction and tutorial, but http://drupal.org/node/298486 is a lot of handy info for developers.

Code

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

  // Administer list
  $items['admin/settings/heartbeat'] = array(
    'title' => t('heartbeat settings'),
    'description' => t('Administer settings for heartbeat.'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'heartbeat_admin_settings',
    ),
    'access arguments' => array(
      'configure heartbeat',
    ),
    'file' => 'heartbeat.admin.inc',
  );

  // Tabs
  $items['admin/settings/heartbeat/settings'] = array(
    'title' => t('Heartbeat settings'),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  $items['admin/settings/heartbeat/messages'] = array(
    'title' => t('Heartbeat messages'),
    'description' => t('Administer messages for heartbeat.'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'page callback' => 'heartbeat_messages_overview',
    'access arguments' => array(
      'configure heartbeat messages',
    ),
    'file' => 'heartbeat.admin.inc',
  );
  $items['admin/settings/heartbeat/messages/%'] = array(
    'title' => t('Heartbeat message editer'),
    'description' => t('Administer message for heartbeat.'),
    'weight' => 1,
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'heartbeat_messages_edit',
      4,
    ),
    'access arguments' => array(
      'configure heartbeat messages',
    ),
    'file' => 'heartbeat.admin.inc',
  );
  return $items;
}