You are here

function mailchimp_ecommerce_menu in Mailchimp E-Commerce 7

Implements hook_menu().

File

./mailchimp_ecommerce.module, line 11
Mailchimp eCommerce core functionality.

Code

function mailchimp_ecommerce_menu() {
  $items = [];
  $items['admin/config/services/mailchimp/ecommerce'] = [
    'title' => 'eCommerce',
    'description' => 'Configure Mailchimp eCommerce.',
    'page callback' => 'drupal_get_form',
    'page arguments' => [
      'mailchimp_ecommerce_admin_settings',
    ],
    'access callback' => 'mailchimp_apikey_ready_access',
    'access arguments' => [
      'administer mailchimp',
    ],
    'file' => 'includes/mailchimp_ecommerce.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 20,
  ];
  $items['admin/config/services/mailchimp/ecommerce/sync'] = [
    'title' => 'eCommerce product sync',
    'description' => 'Sync eCommerce product data to Mailchimp.',
    'page callback' => 'drupal_get_form',
    'page arguments' => [
      'mailchimp_ecommerce_admin_sync',
    ],
    'access callback' => 'mailchimp_apikey_ready_access',
    'access arguments' => [
      'administer mailchimp',
    ],
    'file' => 'includes/mailchimp_ecommerce.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 21,
  ];
  $items['admin/config/services/mailchimp/ecommerce/sync-orders'] = [
    'title' => 'eCommerce historical orders sync',
    'description' => 'Sync past eCommerce order data to Mailchimp.',
    'page callback' => 'drupal_get_form',
    'page arguments' => [
      'mailchimp_ecommerce_admin_sync_orders',
    ],
    'access callback' => 'mailchimp_apikey_ready_access',
    'access arguments' => [
      'administer mailchimp',
    ],
    'file' => 'includes/mailchimp_ecommerce.admin.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 22,
  ];
  return $items;
}