function ajax_test_render

Page callback: Returns an element suitable for use by ajax_render().

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

1 string reference to 'ajax_test_render'
ajax_test_menu in drupal/core/modules/system/tests/modules/ajax_test/ajax_test.module
Implements hook_menu().

File

drupal/core/modules/system/tests/modules/ajax_test/ajax_test.module, line 57
Helper module for Ajax framework tests.

Code

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