You are here

function panels_page_fetch_primary_display in Panels 5.2

Same name and namespace in other branches
  1. 6.2 panels_page/panels_page.read.inc \panels_page_fetch_primary_display()

Internal panels_page API function; directs the current display ($panel_page->display) to the primary display ($panel_page->primary), loading the primary display if necessary.

Parameters

object $panel_page:

2 calls to panels_page_fetch_primary_display()
panels_page_fetch_alternate_display in panels_page/panels_page.module
panels_page_fetch_display in panels_page/panels_page.module
Load a display into the 'current display' position, $panel_page->current.

File

panels_page/panels_page.module, line 821
panels_page.module

Code

function panels_page_fetch_primary_display(&$panel_page) {

  // Commented out is a more precise way of telling, but it's probably moot.
  // if (empty($panel_page->primary) || !is_a($panel_page->primary, 'panels_display')) {
  if (empty($panel_page->primary) || !is_object($panel_page->primary)) {
    $panel_page->primary = panels_load_display($panel_page->did);
  }
  $panel_page->display =& $panel_page->primary;
  $panel_page->current = 'primary';
}