You are here

function abjs_menu in A/B Test JS 7

Implements hook_menu().

File

./abjs.module, line 42
Define permissions and admin form paths, and write test JavaScript.

Code

function abjs_menu() {
  $items = array();
  $items['admin/config/user-interface/abjs'] = array(
    'title' => 'A/B Test JS',
    'description' => 'Configure settings, tests, conditions, and experiences',
    'page callback' => 'abjs_test_admin',
    'access arguments' => array(
      'administer ab tests',
    ),
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/tests'] = array(
    'title' => 'Tests',
    'description' => 'A/B Tests',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/conditions'] = array(
    'title' => 'Conditions',
    'description' => 'A/B Test Conditions',
    'page callback' => 'abjs_condition_admin',
    'access arguments' => array(
      'administer ab tests',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/experiences'] = array(
    'title' => 'Experiences',
    'description' => 'A/B Test Experiences',
    'page callback' => 'abjs_experience_admin',
    'access arguments' => array(
      'administer ab tests',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/settings'] = array(
    'title' => 'Settings',
    'description' => 'A/B Test Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'abjs_settings_admin',
    ),
    'access arguments' => array(
      'administer ab test scripts and settings',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 3,
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/tests/add'] = array(
    'title' => 'Add New Test',
    'description' => 'Add New A/B Test',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'abjs_test_form',
    ),
    'access arguments' => array(
      'administer ab tests',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/tests/%/edit'] = array(
    'title' => 'Edit Test',
    'description' => 'Edit A/B Test',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'abjs_test_form',
      5,
    ),
    'access arguments' => array(
      'administer ab tests',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/tests/%/delete'] = array(
    'title' => 'Delete This Test',
    'description' => 'Delete This Test',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'abjs_test_delete_confirm_form',
      5,
    ),
    'access arguments' => array(
      'administer ab tests',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/conditions/add'] = array(
    'title' => 'Add New Condition',
    'description' => 'Add New A/B Test Condition',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'abjs_condition_form',
    ),
    'access arguments' => array(
      'administer ab test scripts and settings',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/conditions/%/edit'] = array(
    'title' => 'Edit Condition',
    'description' => 'Edit A/B Test Condition',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'abjs_condition_form',
      5,
    ),
    'access arguments' => array(
      'administer ab test scripts and settings',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/conditions/%/delete'] = array(
    'title' => 'Delete This Condition',
    'description' => 'Delete This Condition',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'abjs_condition_delete_confirm_form',
      5,
    ),
    'access arguments' => array(
      'administer ab test scripts and settings',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/experiences/add'] = array(
    'title' => 'Add New Experience',
    'description' => 'Add New A/B Test Experience',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'abjs_experience_form',
    ),
    'access arguments' => array(
      'administer ab test scripts and settings',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/experiences/%/edit'] = array(
    'title' => 'Edit Experience',
    'description' => 'Edit A/B Test Experience',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'abjs_experience_form',
      5,
    ),
    'access arguments' => array(
      'administer ab test scripts and settings',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'abjs.admin.inc',
  );
  $items['admin/config/user-interface/abjs/experiences/%/delete'] = array(
    'title' => 'Delete This Experience',
    'description' => 'Delete This Experience',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'abjs_experience_delete_confirm_form',
      5,
    ),
    'access arguments' => array(
      'administer ab test scripts and settings',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'abjs.admin.inc',
  );
  return $items;
}