function entity_embed_command_close_dialog in Entity Embed 7
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
An array suitable for use with the ajax_render() function.
File
- includes/
entity_embed.commands.inc, line 36 - AJAX commands.
Code
function entity_embed_command_close_dialog($selector = NULL, $persist = FALSE) {
return array(
'command' => 'closeDialog',
'selector' => $selector ? $selector : '#drupal-modal',
'persist' => $persist,
);
}