function hook_ajax_render_alter

Alter the commands that are sent to the user through the Ajax framework.

Parameters

$commands: An array of all commands that will be sent to the user.

See also

ajax_render()

Related topics

2 invocations of hook_ajax_render_alter()
AjaxResponse::ajaxRender in drupal/core/lib/Drupal/Core/Ajax/AjaxResponse.php
Prepares the AJAX commands for sending back to the client.
ajax_render in drupal/core/includes/ajax.inc
Renders a commands array into JSON.

File

drupal/core/modules/system/system.api.php, line 498
Hooks provided by Drupal core and the System module.

Code

function hook_ajax_render_alter($commands) {

  // Inject any new status messages into the content area.
  $commands[] = ajax_command_prepend('#block-system-main .content', theme('status_messages'));
}