You are here

function constant_contact_menu in Constant Contact 6.3

Same name and namespace in other branches
  1. 5 constant_contact.module \constant_contact_menu()
  2. 6 constant_contact.module \constant_contact_menu()
  3. 6.2 constant_contact.module \constant_contact_menu()
  4. 7.3 constant_contact.module \constant_contact_menu()

Adds an admin menu for the Cnstant Contact module

File

./constant_contact.module, line 84

Code

function constant_contact_menu() {
  $items = array();

  // display an intro page
  $items['admin/settings/constant_contact'] = array(
    'title' => 'Constant contact',
    'description' => 'Setup and configure your Constant Contact signup form',
    'page callback' => 'constant_contact_intro',
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'admin.system.inc',
  );
  $items['admin/settings/constant_contact/intro'] = array(
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'title' => 'Constant Contact',
    'weight' => -10,
  );

  // display the setup page
  $items['admin/settings/constant_contact/setup'] = array(
    'title' => 'Setup',
    'description' => 'Setup the constant contact module',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'constant_contact_setup',
    ),
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'admin.system.inc',
    'weight' => 0,
  );

  // display the settings page
  $items['admin/settings/constant_contact/settings'] = array(
    'title' => 'Change settings',
    'description' => 'Change your constant contact settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'constant_contact_settings',
    ),
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'admin.system.inc',
    'weight' => 1,
  );

  // display the activities page
  $items['admin/settings/constant_contact/activities'] = array(
    'title' => 'View Activities',
    'description' => 'View Your Constant Contact Activities',
    'page callback' => 'constant_contact_view_activities',
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'admin.activities.inc',
    'weight' => 5,
  );

  // display the import page
  $items['admin/settings/constant_contact/import'] = array(
    'title' => 'Import',
    'description' => 'Import subscribers to your constant contact mailing lists',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'constant_contact_import',
    ),
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'admin.import.inc',
    'weight' => 10,
  );

  // display the export page
  $items['admin/settings/constant_contact/export'] = array(
    'title' => 'Export',
    'description' => 'Export subscribers from your constant contact mailing lists',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'constant_contact_export',
    ),
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'admin.export.inc',
    'weight' => 15,
  );
  $items['admin/settings/constant_contact/activities/%'] = array(
    'title' => 'View Activity',
    'description' => 'View Information About This Activity',
    'page callback' => 'constant_contact_view_activity',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'admin.activities.inc',
  );
  $items['admin/settings/constant_contact/activities/download/%'] = array(
    'title' => 'Download File',
    'description' => 'Download the Activity File',
    'page callback' => 'constant_contact_download_activity',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'admin.activities.inc',
  );

  // display the contact lists page
  $items['admin/settings/constant_contact/lists'] = array(
    'title' => 'Contact Lists',
    'description' => 'Manage your contact lists',
    'page callback' => 'constant_contact_manage_lists',
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'admin.lists.inc',
    'weight' => 20,
  );
  $items['admin/settings/constant_contact/lists/add'] = array(
    'title' => 'Add List',
    'description' => 'Add a new contact list to constant contact',
    'page callback' => 'constant_contact_add_list',
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'admin.lists.inc',
  );
  $items['admin/settings/constant_contact/lists/edit/%'] = array(
    'title' => 'Edit List',
    'description' => 'Edit a contact list',
    'page callback' => 'constant_contact_edit_list',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'admin.lists.inc',
  );
  $items['admin/settings/constant_contact/lists/delete/%'] = array(
    'title' => 'Delete List',
    'description' => 'Delete a contact list',
    'page callback' => 'constant_contact_delete_list',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'admin.lists.inc',
  );
  return $items;
}