You are here

function constant_contact_menu in Constant Contact 7.3

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

Implements hook_menu().

File

./constant_contact.module, line 82

Code

function constant_contact_menu() {
  $items = array();
  $username = variable_get('cc_username', '');
  $password = variable_get('cc_password', '');

  // add user login page handler
  $items['check_login_handler'] = array(
    'page callback' => array(
      'constant_contact_check_login',
    ),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );

  // display an intro page
  $items['admin/config/services/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',
    ),
    'weight' => 1,
    'file' => 'admin.system.inc',
  );
  $items['admin/config/services/constant_contact/intro'] = array(
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'title' => 'Constant Contact',
    'weight' => -10,
  );

  // display the setup page
  $items['admin/config/services/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/config/services/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/config/services/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/config/services/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/config/services/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/config/services/constant_contact/activities/%'] = array(
    'title' => 'View Activity',
    'description' => 'View Information About This Activity',
    'page callback' => 'constant_contact_view_activity',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'admin.activities.inc',
  );
  $items['admin/config/services/constant_contact/activities/download/%'] = array(
    'title' => 'Download File',
    'description' => 'Download the Activity File',
    'page callback' => 'constant_contact_download_activity',
    'page arguments' => array(
      6,
    ),
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'admin.activities.inc',
  );

  // display the contact lists page
  $items['admin/config/services/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/config/services/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/config/services/constant_contact/lists/edit/%'] = array(
    'title' => 'Edit List',
    'description' => 'Edit a contact list',
    'page callback' => 'constant_contact_edit_list',
    'page arguments' => array(
      6,
    ),
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'admin.lists.inc',
  );
  $items['admin/config/services/constant_contact/lists/delete/%'] = array(
    'title' => 'Delete List',
    'description' => 'Delete a contact list',
    'page callback' => 'constant_contact_delete_list',
    'page arguments' => array(
      6,
    ),
    'access arguments' => array(
      'administer constant_contact',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'admin.lists.inc',
  );
  return $items;
}