function overlay_close_dialog
7.x overlay.module | overlay_close_dialog($redirect = NULL, $redirect_options = array()) |
Requests that the overlay closes when the page is displayed.
Parameters
$redirect: (optional) The path that should open in the parent window after the overlay closes. If not set, no redirect will be performed on the parent window.
$redirect_options: (optional) An associative array of options to use when generating the redirect URL.
1 call to overlay_close_dialog()
- overlay_init in drupal-7.x/
modules/ overlay/ overlay.module - Implements hook_init().
2 string references to 'overlay_close_dialog'
- overlay_drupal_goto_alter in drupal-7.x/
modules/ overlay/ overlay.module - Implements hook_drupal_goto_alter().
- overlay_init in drupal-7.x/
modules/ overlay/ overlay.module - Implements hook_init().
File
- drupal-7.x/
modules/ overlay/ overlay.module, line 722 - Displays the Drupal administration interface in an overlay.
Code
function overlay_close_dialog($redirect = NULL, $redirect_options = array()) {
$settings = array(
'overlayChild' => array(
'closeOverlay' => TRUE,
),
);
// Tell the child window to perform the redirection when requested to.
if (isset($redirect)) {
$settings['overlayChild']['redirect'] = url($redirect, $redirect_options);
}
drupal_add_js($settings, array('type' => 'setting'));
// Since we are closing the overlay as soon as the page is displayed, we do
// not want to show any of the page's actual content.
overlay_display_empty_page(TRUE);
}