function dialog_command_close_dialog in Dialog 7.2
Creates a Drupal Ajax 'close dialog' command.
Parameters
string $selector: A CSS selector string of the dialog to close.
bool $persist: (optional) Whether to persist the dialog in the DOM or not.
Return value
array An array suitable for use with the ajax_render() function.
2 calls to dialog_command_close_dialog()
- dialog_command_close_modal_dialog in includes/
dialog.commands.inc - Creates a Drupal Ajax 'close modal dialog' command.
- dialog_test_dialog_close in tests/
dialog_test.module - Menu callback: Close the ajax dialog.
File
- includes/
dialog.commands.inc, line 19 - AJAX commands.
Code
function dialog_command_close_dialog($selector = NULL, $persist = FALSE) {
return array(
'command' => 'closeDialog',
'selector' => $selector ? $selector : '#drupal-modal',
'persist' => $persist,
);
}