1.20.x ajax_test.module ajax_test_render()

Menu callback; Return an element suitable for use by ajax_deliver().

Additionally ensures that ajax_render() incorporates JavaScript settings generated during the page request by invoking backdrop_add_js() with a dummy setting.

File

modules/simpletest/tests/ajax_test.module, line 60
Helper module for Ajax framework tests.

Code

function ajax_test_render() {
  backdrop_add_js(array('ajax' => 'test'), 'setting');
  return array('#type' => 'ajax', '#commands' => array());
}