function panels_page_fetch_primary_display in Panels 6.2
Same name and namespace in other branches
- 5.2 panels_page/panels_page.module \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:
5 calls to panels_page_fetch_primary_display()
- panels_page_fetch_alternate_display in panels_page/
panels_page.read.inc - panels_page_fetch_display in panels_page/
panels_page.read.inc - Load a display into the 'current display' position, $panel_page->current.
- panels_page_load in panels_page/
panels_page.read.inc - Load a panel page.
- panels_page_preview_page in panels_page/
panels_page.admin.inc - _panels_page_master_loader in panels_page/
panels_page.module - Determine the render-time behavior of panels_page.
File
- panels_page/
panels_page.read.inc, line 207 - panels_page.write.inc
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)) {
if ($panel_page->type != t('Default')) {
$panel_page->primary = panels_load_display($panel_page->did);
}
}
$panel_page->display =& $panel_page->primary;
$panel_page->current = 'primary';
// Update the cache.
panels_page_loaded_cache($panel_page->name, $panel_page);
}