hook_batch_alter
function hook_batch_alter
hook_batch_alter(&$batch)
Alter batch information before a batch is processed.
Called by batch_process() to allow modules to alter a batch before it is processed.
Parameters
$batch: The associative array of batch information. See batch_set() for details on what this could contain.
See also
Related topics
File
- modules/system/system.api.php, line 4630
- Hooks provided by Drupal core and the System module.
Code
function hook_batch_alter(&$batch) { // If the current page request is inside the overlay, add ?render=overlay to // the success callback URL, so that it appears correctly within the overlay. if (overlay_get_mode() == 'child') { if (isset($batch['url_options']['query'])) { $batch['url_options']['query']['render'] = 'overlay'; } else { $batch['url_options']['query'] = array('render' => 'overlay'); } } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_batch_alter/7.x