You are here

function heartbeat_menu in Heartbeat 6.3

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

Implementation of hook_menu().

File

./heartbeat.module, line 103

Code

function heartbeat_menu() {
  $items = array();
  $items['heartbeat/public'] = array(
    'title' => 'public heartbeat page',
    'description' => 'Public heartbeat page',
    'page callback' => 'heartbeat_site_messages',
    'access arguments' => array(
      'view heartbeat messages',
    ),
  );
  $items['heartbeat/activity/personal'] = array(
    'title' => 'Activity',
    'description' => 'All activity from you and your connections',
    'page callback' => 'heartbeat_connected_messages',
    'access arguments' => array(
      'view heartbeat messages',
    ),
  );

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

  // Tabs
  $items['admin/settings/heartbeat/settings'] = array(
    'title' => 'Heartbeat settings',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  $items['admin/settings/heartbeat/delete'] = array(
    'title' => 'Delete activity logs',
    'description' => 'Delete heartbeat activity logs.',
    'page arguments' => array(
      'heartbeat_delete_logs_confirm',
    ),
    'access arguments' => array(
      'delete heartbeat activity logs',
    ),
    'file' => 'heartbeat.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 5,
  );

  // Build menu
  $items['admin/build/heartbeat'] = array(
    'title' => 'Heartbeat messages',
    'description' => 'Administer messages for heartbeat.',
    'weight' => -5,
    'page callback' => 'heartbeat_messages_overview',
    'access arguments' => array(
      'configure heartbeat messages',
    ),
    'file' => 'heartbeat.admin.inc',
  );
  $items['admin/build/heartbeat/list'] = array(
    'title' => 'List',
    'description' => 'Overview messages',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  $items['admin/build/heartbeat/add'] = array(
    'title' => 'Add heartbeat message',
    'description' => 'Administer message for heartbeat.',
    'weight' => 1,
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'heartbeat_messages_add',
    ),
    'access arguments' => array(
      'add heartbeat message',
    ),
    'file' => 'heartbeat.admin.inc',
  );
  $items['admin/build/heartbeat/export'] = array(
    'title' => 'Export',
    'description' => 'Export messages to use as default.',
    'weight' => 1,
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'heartbeat_messages_export',
    ),
    'access arguments' => array(
      'configure heartbeat messages',
    ),
    'file' => 'heartbeat.admin.inc',
  );
  $items['admin/build/heartbeat/edit/%'] = array(
    'title' => 'Edit heartbeat message',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'heartbeat_messages_edit',
      4,
    ),
    'access arguments' => array(
      'configure heartbeat messages',
    ),
    'file' => 'heartbeat.admin.inc',
  );
  $items['admin/build/heartbeat/delete/%'] = array(
    'title' => 'Delete heartbeat message',
    'description' => 'Administer deletions of messages.',
    'type' => MENU_CALLBACK,
    'page callback' => 'heartbeat_messages_delete',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'configure heartbeat messages',
    ),
    'file' => 'heartbeat.admin.inc',
  );

  // Callbacks
  $items['heartbeat/heartbeat_activity_rules_default/js'] = array(
    'title' => 'Callback to supply extra action variables as arguments',
    'type' => MENU_CALLBACK,
    'page callback' => 'heartbeat_activity_rules_action_message_id_js',
    'access arguments' => array(
      'configure heartbeat messages',
    ),
    'file' => 'heartbeat.admin.inc',
  );
  $items['heartbeat/message_types/js'] = array(
    'title' => 'Callback to supply textarea changes for messages',
    'page callback' => 'heartbeat_message_type_js',
    'access arguments' => array(
      'configure heartbeat messages',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'heartbeat.admin.inc',
  );
  $items['admin/settings/heartbeat/heartbeat_activity'] = array(
    'title' => 'user activity settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'heartbeat_logs_admin_settings',
    ),
    'access arguments' => array(
      'configure user activity',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 6,
    'file' => 'heartbeat.admin.inc',
  );
  $items['heartbeat/ahah/%'] = array(
    'page callback' => 'heartbeat_activity_ahah',
    'page arguments' => array(
      2,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'configure user activity',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'heartbeat.admin.inc',
  );
  return $items;
}