hook_ajax_render_alter

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 hook_ajax_render_alter($commands)

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

Code

modules/system/system.api.php, line 835

<?php
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'));
}
?>