You are here

function ajax_command_close_dialog in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.2 brightcove_field/brightcove_field.module \ajax_command_close_dialog()
  2. 7.3 brightcove_field/brightcove_field.module \ajax_command_close_dialog()
  3. 7.4 brightcove_field/brightcove_field.module \ajax_command_close_dialog()
  4. 7.5 brightcove_field/brightcove_field.module \ajax_command_close_dialog()
  5. 7.6 brightcove.module \ajax_command_close_dialog()

Creates a Drupal Ajax 'ui_close_dialog' command.

The 'dialog' command instructs the client to close a jQuery UI Dialog box.

This command is implemented by Drupal.ajax.prototype.commands.ui() defined in brightcove/brightcove_field/brightcove.js.

Parameters

$selector: Selector of the dialog that should be closed.

$data: Data to send on close, depends on dialog type.

$settings:

$dialog_type: Type of dialog to close.

Return value

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

3 calls to ajax_command_close_dialog()
ajax_browse_dialog_close_callback in ./brightcove.module
Page callback for closing a dialog.
ajax_edit_video_dialog_close_callback in ./brightcove.module
ajax_upload_video_dialog_close_callback in ./brightcove.module

File

./brightcove.module, line 1685
Brightcove module is an integration layer between any modules using Brightcove API. It makes all necessary checks for the API and makes settings available to the user.

Code

function ajax_command_close_dialog($selector = '<div>', $data, $settings = NULL, $dialog_type) {
  return [
    'command' => 'ui_dialog_close',
    'selector' => $selector,
    'data' => $data,
    'settings' => $settings,
    'dialog_type' => $dialog_type,
  ];
}