You are here

function mandrill_menu in Mandrill 7

Same name and namespace in other branches
  1. 6 mandrill.module \mandrill_menu()
  2. 7.2 mandrill.module \mandrill_menu()

Implements hook_menu().

File

./mandrill.module, line 30
Enables Drupal to send email directly through Mandrill.

Code

function mandrill_menu() {
  $items = array();
  $items['admin/config/services/mandrill'] = array(
    'title' => 'Mandrill',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mandrill_admin_settings',
    ),
    'access arguments' => array(
      'administer mandrill',
    ),
    'description' => 'Send emails through the Mandrill transactional email service.',
    'file' => 'mandrill.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/config/services/mandrill/settings'] = array(
    'title' => 'Settings',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  $items['admin/config/services/mandrill/test'] = array(
    'title' => 'Send test email',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mandrill_test_form',
    ),
    'access callback' => 'mandrill_test_access',
    'description' => 'Send a test email using the Mandrill API.',
    'file' => 'mandrill.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
  );
  return $items;
}