function slack_menu in Slack 7
Same name and namespace in other branches
- 6 slack.module \slack_menu()
Implements hook_menu().
File
- ./
slack.module, line 40 - Main module file, only hooks are allowed here.
Code
function slack_menu() {
$items = array();
$slack_module_url = 'admin/config/services/slack';
$items[$slack_module_url] = array(
'title' => 'Slack',
'description' => 'Configure slack module.',
'page callback' => 'system_admin_menu_block_page',
'access arguments' => array(
'administer site configuration',
),
'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;
}