You are here

function MODULE_js_callback_CALLBACK in JS Callback Handler 7.2

A callback hook.

Parameters

mixed ...$args: One or more variables that match the snake cased parameters passed in the request. This is dynamically processed, so if the variable name defined in the callback's signature does not match any of the parameters passed in the request, then it will be ignored and passed to the $data parameter.

array $data: The array of parameters that were passed in the request, but not automatically matched from the callback's signature.

Return value

array|int An array of JSON data or a constant representing an internal menu status:

See also

hook_js_info()

js_callback_process_request()

js_http_response()

File

./js.api.php, line 290
This file contains no working PHP code; it exists to provide documentation for this module's API.

Code

function MODULE_js_callback_CALLBACK($args, array $data) {
  $json = array();
  $json['content'] = '<p>My content</p>';
  return $json;
}