1 form_test.module form_test_storage_legacy_handler($form_build_id)

Emulate legacy AHAH-style ajax callback.

Drupal 6 AHAH callbacks used to operate directly on forms retrieved using form_get_cache and stored using form_set_cache after manipulation. This callback helps testing whether form_set_cache prevents resaving of immutable forms.


core/modules/simpletest/tests/form_test.module, line 896
Helper module for the Form API tests.


function form_test_storage_legacy_handler($form_build_id) {
  $form_state = array();
  $form = form_get_cache($form_build_id, $form_state);

    'form' => $form,
    'form_state' => $form_state,

  $form['#poisoned'] = TRUE;
  $form_state['poisoned'] = TRUE;

  form_set_cache($form_build_id, $form, $form_state);

  // This exit call is necessary for a "legacy" handler, otherwise Backdrop will
  // append AJAX commands for settings to the already-printed JSON string.