You are here

function dialog_display in Dialog 7

Provides an easy way of representing the current page context as a dialog.

Parameters

$options: (optional) If set, will become the options that are used when displaying the dialog to the user. See the jQuery UI Dialog options documentation for more information on this: http://jqueryui.com/demos/dialog/ .

Return value

FALSE if the page is not to become a dialog box. Otherwise, will be an array of options that were previously set through the call to dialog_display. These options define how the resulting dialog box should be displayed.

5 calls to dialog_display()
dialog_ajax_render_alter in ./dialog.module
Implement hook_ajax_render_alter().
dialog_contextual_init in modules/dialog_contextual/dialog_contextual.module
Implement hook_page_alter().
dialog_page_alter in ./dialog.module
Implementation of hook_page_alter().
dialog_user_ajax_callback in modules/dialog_user/dialog_user.module
Menu callback for our ajax links.
dialog_user_form_alter in modules/dialog_user/dialog_user.module
Implement hook_form_alter().
1 string reference to 'dialog_display'
dialog_command_display in ./dialog.module
Creates a Drupal AJAX command to place HTML within the modal and open it.

File

./dialog.module, line 52
The Dialog module provides an API for displaying and interacting with jQuery UI Dialog modals.

Code

function dialog_display($options = NULL) {
  $dialog =& drupal_static(__FUNCTION__, FALSE);
  if (isset($options)) {

    // Make sure that an array is passed in as the options.
    $dialog = is_array($options) ? $options : array(
      'dialogClass' => drupal_html_class($_GET['q']),
    );
  }
  return $dialog;
}