You are here

function sparkpost_menu in Sparkpost email 7

Same name and namespace in other branches
  1. 7.2 sparkpost.module \sparkpost_menu()

Implements hook_menu().

File

./sparkpost.module, line 14
Sparkpost integration.

Code

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