You are here

function sendgrid_integration_menu in SendGrid Integration 7

Same name and namespace in other branches
  1. 6 sendgrid_integration.module \sendgrid_integration_menu()

Implements hook_menu().

File

./sendgrid_integration.module, line 25
Main module file for SendGrid Integration.

Code

function sendgrid_integration_menu() {
  $items = [];
  $items['admin/config/services/sendgrid'] = [
    'title' => 'SendGrid Settings',
    'description' => 'SendGrid Integration Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => [
      'sendgrid_integration_admin',
    ],
    'access callback' => 'user_access',
    'access arguments' => [
      'administer sendgrid settings',
    ],
    'file' => 'sendgrid_integration.admin.inc',
    'type' => MENU_NORMAL_ITEM,
    'weight' => 1,
  ];
  $items['admin/config/services/sendgrid/default'] = [
    'title' => 'Administer SendGrid Integration',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  ];
  $items['admin/config/services/sendgrid/test'] = [
    'title' => 'SendGrid Test Email Send',
    'description' => 'Send a test email through sendgrid.',
    'page callback' => 'drupal_get_form',
    'page arguments' => [
      'sendgrid_integration_test',
    ],
    'access callback' => 'user_access',
    'access arguments' => [
      'administer sendgrid settings',
    ],
    'file' => 'sendgrid_integration.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 50,
  ];
  return $items;
}