Mercurial > hg > cmmr2012-drupal-site
annotate vendor/chi-teck/drupal-code-generator/templates/d7/hook/batch_alter.twig @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@0 | 1 /** |
Chris@0 | 2 * Implements hook_batch_alter(). |
Chris@0 | 3 */ |
Chris@0 | 4 function {{ machine_name }}_batch_alter(&$batch) { |
Chris@0 | 5 // If the current page request is inside the overlay, add ?render=overlay to |
Chris@0 | 6 // the success callback URL, so that it appears correctly within the overlay. |
Chris@0 | 7 if (overlay_get_mode() == 'child') { |
Chris@0 | 8 if (isset($batch['url_options']['query'])) { |
Chris@0 | 9 $batch['url_options']['query']['render'] = 'overlay'; |
Chris@0 | 10 } |
Chris@0 | 11 else { |
Chris@0 | 12 $batch['url_options']['query'] = array('render' => 'overlay'); |
Chris@0 | 13 } |
Chris@0 | 14 } |
Chris@0 | 15 } |