You are here

function panels_page_set_current in Panels 6.2

5 calls to panels_page_set_current()
panels_page_admin_cache_load in panels_page/panels_page.module
Menu loader for some panels_page admin screens. Loads the panels_page specified by the name arg from the edit cache, or induces a 404 when a bad arg is provided.
panels_page_admin_load in panels_page/panels_page.module
Menu loader for some panels_page admin screens. Loads the panels_page specified by the name arg, induces a 404 when a bad arg is provided.
panels_page_edit_alternate in panels_page/panels_page.admin.inc
panels_page_get_current in panels_page/panels_page.module
Figure out if a panel is the current page; mostly useful in theming.
_panels_page_prepare_panels_render in panels_page/panels_page.render.inc
1 string reference to 'panels_page_set_current'
panels_page_get_current in panels_page/panels_page.module
Figure out if a panel is the current page; mostly useful in theming.

File

panels_page/panels_page.read.inc, line 147
panels_page.write.inc

Code

function panels_page_set_current(&$panel_page) {
  static $cache;

  // Only allow the current cache to be set once per request.
  if (!isset($cache) && isset($panel_page)) {

    // In PHP5 if we actually set a reference here, the panel page will get destroyed
    // when the original reference is destroyed, but in PHP4 we need a reference
    // to prevent copying it.
    if (version_compare(PHP_VERSION, '5', '>=')) {
      $cache = $panel_page;
    }
    else {
      $cache =& $panel_page;
    }
  }
  return $cache;
}