function overlay_store_rendered_content

overlay_store_rendered_content($id = NULL, $content = NULL)

Stores strings representing rendered HTML content.

This function is used to keep a static cache of rendered content that can be referred to later in the page request.

Parameters

$id: (Optional) An identifier for the content which is being stored, which will be used as an array key in the returned array. If omitted, no change will be made to the current stored data.

$content: (Optional) A string representing the rendered data to store. This only has an effect if $id is also provided.

Return value

An array representing all data that is currently being stored, or an empty array if there is none.

See also

overlay_get_rendered_content()

File

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

Code

function overlay_store_rendered_content($id = NULL, $content = NULL) {
  $rendered_content = &drupal_static(__FUNCTION__, array());
  if (isset($id)) {
    $rendered_content[$id] = $content;
  }
  return $rendered_content;
}

© 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_store_rendered_content/7.x