You are here

function js_test_js in JS Callback Handler 7

Same name and namespace in other branches
  1. 6 tests/js_test.module \js_test_js()

Implements hook_js().

File

tests/js_test.module, line 10
JavaScript callback handler tests.

Code

function js_test_js() {
  $items = array();
  $items['test_basic'] = array(
    'callback' => 'js_test_basic',
  );
  $items['test_basic_access'] = array(
    'callback' => 'js_test_basic',
    'access arguments' => array(
      'js test permission',
    ),
  );
  $items['test_basic_access_failure'] = array(
    'callback' => 'js_test_basic',
    'access arguments' => array(
      'non existing permission',
    ),
  );
  $items['test_arguments'] = array(
    'callback' => 'js_test_arguments',
    'page arguments' => array(
      1,
      3,
    ),
  );
  $items['test_file'] = array(
    'callback' => 'js_test_file',
    'file' => 'js_test.callbacks.inc',
  );
  $items['test_init'] = array(
    'callback' => 'js_test_basic',
    'skip_hook_init' => TRUE,
  );
  $items['test_variable'] = array(
    'callback' => 'js_test_variable',
    'bootstrap' => DRUPAL_BOOTSTRAP_VARIABLES,
  );
  return $items;
}