You are here

function acquia_lift_menu in Acquia Lift Connector 7

Same name and namespace in other branches
  1. 7.3 acquia_lift.module \acquia_lift_menu()
  2. 7.2 acquia_lift.module \acquia_lift_menu()

Implements hook_menu().

File

./acquia_lift.module, line 15
acquia_lift.module Provides Acquia Lift-specific personalization functionality.

Code

function acquia_lift_menu() {
  $items = array();
  $items['admin/config/content/personalize/acquia_lift'] = array(
    'type' => MENU_LOCAL_TASK,
    'title' => 'Acquia Lift',
    'page callback' => 'acquia_lift_configuration_page',
    'access arguments' => array(
      'administer personalize configuration',
    ),
    'file' => 'acquia_lift.admin.inc',
  );
  $items['admin/acquia_lift'] = array(
    'title' => 'Acquia Lift',
    'description' => 'Manage Acquia Lift campaigns.',
    'position' => 'right',
    'weight' => 0,
    'page callback' => 'acquia_lift_root_page',
    'access arguments' => array(
      'manage personalized content',
    ),
    'file' => 'acquia_lift.ui.inc',
  );
  $items['acquia_lift/controls/assets'] = array(
    'page callback' => 'acquia_lift_controls_assets_callback',
    'access arguments' => array(
      'manage personalized content',
    ),
    'delivery callback' => 'ajax_deliver',
    'theme callback' => 'ajax_base_page_theme',
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.ui.inc',
  );
  $items['acquia_lift/personalize_in_context/start'] = array(
    'page callback' => 'personalize_in_context_start',
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.ui.inc',
  );
  $items['acquia_lift/personalize_in_context/stop'] = array(
    'page callback' => 'acquia_lift_edit_mode_disable',
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.ui.inc',
  );

  // Ajax callback for processing the queue.
  $items['acquia_lift/queue'] = array(
    'type' => MENU_CALLBACK,
    'page callback' => 'acquia_lift_process_queue',
    // We don't need an access check here as the queue will only get
    // processed if a particular session variable is set.
    // @see acquia_lift_process_queue()
    'access callback' => TRUE,
  );

  // Ajax callback to provide updated campaign settings to JavaScript.
  $items['acquia_lift/settings'] = array(
    'type' => MENU_CALLBACK,
    'page callback' => 'acquia_lift_settings_update',
    'access arguments' => array(
      'manage personalized content',
    ),
    'delivery callback' => 'ajax_deliver',
    'theme callback' => 'ajax_base_page_theme',
    'type' => MENU_CALLBACK,
  );

  // Ajax callback to generate report data.
  $items['acquia_lift/reports/conversion'] = array(
    'type' => MENU_CALLBACK,
    'page callback' => 'acquia_lift_report_conversion',
    'access arguments' => array(
      'manage personalized content',
    ),
    'file' => 'acquia_lift.admin.inc',
  );

  // Ajax callback to open the create campaign screen in a modal window.
  $items['admin/structure/personalize/add/%ctools_js'] = array(
    'page callback' => 'acquia_lift_campaign_create_modal_callback',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // AJAX callback to create a new campaign in a modal window.
  $items['admin/structure/acquia_lift/add/%/%ctools_js'] = array(
    'page callback' => 'acquia_lift_campaign_type_create_modal_callback',
    'page arguments' => array(
      4,
      5,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // AJAX callback to cancel a modal creation flow.
  $items['admin/structure/acquia_lift/cancel/%ctools_js'] = array(
    'page callback' => 'acquia_lift_campaign_flow_cancel',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // AJAX callback to add a new variation set to a campaign.
  $items['admin/structure/acquia_lift/variations/add/%ctools_js'] = array(
    'page callback' => 'acquia_lift_option_set_add_modal_callback',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // AJAX callback to retrieve a page variation details form.
  $items['admin/structure/acquia_lift/variation/%'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'acquia_lift_element_variation_details_form',
      4,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'delivery callback' => 'ajax_deliver',
    'theme callback' => 'ajax_base_page_theme',
  );

  // AJAX callback to rename a page variation.
  $items['admin/structure/acquia_lift/pagevariation/rename/%/%/%ctools_js'] = array(
    'page callback' => 'acquia_lift_page_variation_rename_modal_callback',
    'page arguments' => array(
      5,
      6,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // AJAX callback to delete a page variation.
  $items['admin/structure/acquia_lift/pagevariation/delete/%/%/%ctools_js'] = array(
    'page callback' => 'acquia_lift_page_variation_delete_modal_callback',
    'page arguments' => array(
      5,
      6,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // AJAX callback to delete an element variation.
  $items['admin/structure/acquia_lift/variation/delete/%/%/%ctools_js'] = array(
    'page callback' => 'acquia_lift_element_variation_delete_modal_callback',
    'page arguments' => array(
      5,
      6,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // Ajax callback to open the add a goal selection in a modal window.
  $items['admin/structure/acquia_lift/goal/add/%ctools_js'] = array(
    'page callback' => 'acquia_lift_goal_create_modal_callback',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // Ajax callback to create a goal of a specific type.
  $items['admin/structure/acquia_lift/goal/add/%/%ctools_js'] = array(
    'page callback' => 'acquia_lift_goal_type_create_modal_callback',
    'page arguments' => array(
      5,
      6,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // Ajax callback to rename a goal.
  $items['admin/structure/acquia_lift/goal/rename/%/%ctools_js'] = array(
    'page callback' => 'acquia_lift_goal_rename_modal_callback',
    'page arguments' => array(
      5,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // AJAX callback to delete a goal.
  $items['admin/structure/acquia_lift/goal/delete/%/%/%ctools_js'] = array(
    'page callback' => 'acquia_lift_goal_delete_modal_callback',
    'page arguments' => array(
      5,
      6,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // Callback to show the start campaign form.
  $items['admin/structure/acquia_lift/start/%'] = array(
    'page callback' => 'acquia_lift_campaign_start_modal_callback',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
    'theme callback' => 'ajax_base_page_theme',
  );

  // AJAX callback to change the status of a campaign.
  $items['admin/structure/personalize/manage/%personalize_agent/ajax_status/%'] = array(
    'page callback' => 'acquia_lift_agent_set_status_ajax',
    'page arguments' => array(
      4,
      6,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'manage personalized content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'acquia_lift.admin.unibar.inc',
  );
  $items['admin/structure/personalize/manage/%personalize_agent/lift-add-audience'] = array(
    'title' => t('Add target audience'),
    'weight' => 1,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'acquia_lift_new_target_audience_form',
      4,
    ),
    'access callback' => 'acquia_lift_target_access',
    'access arguments' => array(
      4,
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'acquia_lift.admin.inc',
  );
  $items['admin/structure/personalize/manage/%personalize_agent/lift-target'] = array(
    'title' => t('Target variations'),
    'weight' => 2,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'acquia_lift_targeting_form',
      4,
    ),
    'access callback' => 'acquia_lift_target_access',
    'access arguments' => array(
      4,
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'acquia_lift.admin.inc',
  );
  $items['admin/structure/personalize/manage/%personalize_agent/lift-review'] = array(
    'title' => t('Apply changes'),
    'weight' => 3,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'acquia_lift_review_form',
      4,
    ),
    'access callback' => 'acquia_lift_target_access',
    'access arguments' => array(
      4,
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'acquia_lift.admin.inc',
  );
  return $items;
}