You are here

function mailchimp_lists_menu in Mailchimp 7.2

Same name and namespace in other branches
  1. 7.5 modules/mailchimp_lists/mailchimp_lists.module \mailchimp_lists_menu()
  2. 7.3 modules/mailchimp_lists/mailchimp_lists.module \mailchimp_lists_menu()
  3. 7.4 modules/mailchimp_lists/mailchimp_lists.module \mailchimp_lists_menu()

Implements hook_menu().

File

modules/mailchimp_lists/mailchimp_lists.module, line 16
Mailchimp lists module.

Code

function mailchimp_lists_menu() {
  $items = array();
  $items['admin/config/services/mailchimp/lists'] = array(
    'title' => 'Lists and Users',
    'description' => 'Manage MailChimp Lists and user settings.',
    'page callback' => 'mailchimp_lists_overview_page',
    'access arguments' => array(
      'administer mailchimp',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'includes/mailchimp_lists.admin.inc',
    'weight' => -10,
  );
  $items['admin/config/services/mailchimp/lists/add'] = array(
    'title' => 'Add a list',
    'description' => 'Add a new MailChimp list.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailchimp_lists_list_form',
    ),
    'access arguments' => array(
      'administer mailchimp',
    ),
    'file' => 'includes/mailchimp_lists.admin.inc',
    'type' => MENU_LOCAL_ACTION,
  );
  $items['admin/config/services/mailchimp/lists/refresh'] = array(
    'title' => 'Refresh lists from MailChimp',
    'description' => 'Refresh lists from MailChimp.',
    'page callback' => 'mailchimp_lists_refresh_page',
    'access arguments' => array(
      'administer mailchimp',
    ),
    'type' => MENU_LOCAL_ACTION,
    'file' => 'includes/mailchimp_lists.admin.inc',
  );
  $items['admin/config/services/mailchimp/lists/%mailchimp_lists/edit'] = array(
    'title' => 'Edit a list',
    'description' => 'Edit a new MailChimp list.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailchimp_lists_list_form',
      5,
    ),
    'load arguments' => array(
      5,
    ),
    'access arguments' => array(
      'administer mailchimp',
    ),
    'file' => 'includes/mailchimp_lists.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/config/services/mailchimp/lists/%mailchimp_lists/delete'] = array(
    'title' => 'Delete list',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailchimp_lists_delete_list_form',
      5,
    ),
    'access arguments' => array(
      'administer mailchimp',
    ),
    'file' => 'includes/mailchimp_lists.admin.inc',
  );
  $items['user/%user/mailchimp'] = array(
    'page callback' => 'mailchimp_lists_user_subscribe_page',
    'page arguments' => array(
      1,
    ),
    'title' => 'Newsletter Subscriptions',
    'type' => MENU_LOCAL_TASK,
    'access callback' => 'mailchimp_lists_user_subscribe_page_access',
    'access arguments' => array(
      1,
    ),
  );
  $items['mailchimp/subscribe'] = array(
    'title' => 'Newsletter Subscription',
    'description' => 'Present all available free form newsletter subscriptions.',
    'page callback' => 'mailchimp_lists_freeform_subscribe_page',
    'access callback' => 'mailchimp_lists_freeform_subscribe_page_access',
    'type' => MENU_SUGGESTED_ITEM,
  );
  $items['mailchimp/lists/%mailchimp_lists/queue_existing'] = array(
    'title' => 'Queue existing users',
    'description' => 'Add existing users to a required lists queue.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mailchimp_lists_queue_existing_form',
      2,
    ),
    'access callback' => 'mailchimp_lists_queue_existing_access',
    'access arguments' => array(
      2,
    ),
    'file' => 'includes/mailchimp_lists.admin.inc',
  );
  return $items;
}