You are here

function slack_menu in Slack 6

Same name and namespace in other branches
  1. 7 slack.module \slack_menu()

Implements hook_menu().

File

./slack.module, line 14

Code

function slack_menu() {
  $items = array();
  $slack_module_url = 'admin/content/slack';
  $items[$slack_module_url] = array(
    'title' => 'Slack',
    'description' => 'Configure slack module.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array(
      'access administration pages',
    ),
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  $items[$slack_module_url . '/config'] = array(
    'title' => 'Configuration',
    'description' => 'Adjust slack settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'slack_configure_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'includes/pages/slack.admin.inc',
  );
  $items[$slack_module_url . '/test'] = array(
    'title' => 'Send a message',
    'description' => 'Allows to send a test message to the Slack.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'slack_send_test_message_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'includes/pages/slack.pages.inc',
  );
  return $items;
}