ajax_footer

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 ajax_footer()

Perform end-of-Ajax-request tasks.

This function is the equivalent of drupal_page_footer(), but for Ajax requests.

See also

drupal_page_footer()

Related topics

▾ 1 function calls ajax_footer()

ajax_deliver in includes/ajax.inc
Package and send the result of a page callback to the browser as an Ajax response.

Code

includes/ajax.inc, line 564

<?php
function ajax_footer() {
  // Even for Ajax requests, invoke hook_exit() implementations. There may be
  // modules that need very fast Ajax responses, and therefore, run Ajax
  // requests with an early bootstrap.
  if (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL && (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update')) {
    module_invoke_all('exit');
  }

  // Commit the user session. See above comment about the possibility of this
  // function running without session.inc loaded.
  if (function_exists('drupal_session_commit')) {
    drupal_session_commit();
  }
}
?>