You are here

function mailgun_menu in Mailgun 7

Implements hook_menu().

File

./mailgun.module, line 30
Provides integration with Mailgun's email sending API.

Code

function mailgun_menu() {
  $items = array();
  $items[MAILGUN_ADMIN_PAGE] = array(
    'title' => 'Mailgun',
    'description' => 'Configure Mailgun settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailgun_admin_settings',
    ),
    'access arguments' => array(
      'administer mailgun',
    ),
    'file' => 'mailgun.admin.inc',
  );
  $items[MAILGUN_ADMIN_PAGE . '/settings'] = array(
    'title' => 'Settings',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  $items[MAILGUN_ADMIN_PAGE . '/test'] = array(
    'title' => 'Send test email',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailgun_test_form',
    ),
    'access arguments' => array(
      'administer mailgun',
    ),
    'description' => 'Send a test e-mail using the Mailgun API.',
    'file' => 'mailgun.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );
  return $items;
}