1.20.x ajax.inc ajax_command_close_dialog($selector)

Provides an AJAX command to close an open dialog.

This command is implemented by Backdrop.ajax.prototype.commands.closeDialog() defined in misc/dialog.ajax.js.

Parameters

$selector: A jQuery selector string for the dialog to be closed.

Return value

array: An array suitable for use with the ajax_render() function.

Related topics

File

includes/ajax.inc, line 1402
Functions for use with Backdrop's Ajax framework.

Code

function ajax_command_close_dialog($selector) {
  return array(
    'command' => 'closeDialog',
    'selector' => $selector,
  );
}