function overlay_store_rendered_content in Drupal 7
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()
2 calls to overlay_store_rendered_content()
- overlay_get_rendered_content in modules/
overlay/ overlay.module - Returns any rendered content that was stored earlier in the page request.
- overlay_overlay_child_initialize in modules/
overlay/ overlay.module - Implements hook_overlay_child_initialize().
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;
}