overlay_display_empty_page

function overlay_display_empty_page

overlay_display_empty_page($value = NULL)

Stores and returns whether an empty page override is needed.

This is used to prevent a page request which closes the overlay (for example, a form submission) from being fully re-rendered before the overlay is closed. Instead, we store a variable which will cause the page to be rendered by a delivery callback function that does not actually print visible HTML (but rather only the bare minimum scripts and styles necessary to trigger the overlay to close), thereby allowing the dialog to be closed faster and with less interruption, and also allowing the display of messages to be deferred to the parent window (rather than displaying them in the child window, which will close before the user has had a chance to read them).

Parameters

$value: By default, an empty page will not be displayed. Set to TRUE to request an empty page display, or FALSE to disable the empty page display (if it was previously enabled on this page request).

Return value

TRUE if the current behavior is to display an empty page, or FALSE if not.

See also

overlay_page_delivery_callback_alter()

File

modules/overlay/overlay.module, line 569
Displays the Drupal administration interface in an overlay.

Code

function overlay_display_empty_page($value = NULL) {
  $display_empty_page = &drupal_static(__FUNCTION__, FALSE);
  if (isset($value)) {
    $display_empty_page = $value;
  }
  return $display_empty_page;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!overlay!overlay.module/function/overlay_display_empty_page/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部