You are here

function panels_page_fetch_display_from_info in Panels 5.2

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

Get a display based on whether it's already in code or needs to be loaded.

1 call to panels_page_fetch_display_from_info()
panels_page_fetch_alternate_display in panels_page/panels_page.module

File

panels_page/panels_page.module, line 867
panels_page.module

Code

function panels_page_fetch_display_from_info(&$panel_page, $info, $id) {

  // If the 'display' is set it's the result of an export/default
  if (isset($info['display'])) {
    $panel_page->display = $info['display'];
    return TRUE;
  }

  // If the $did is numeric, it corresponds to an existing display - load it.
  if (is_numeric($info['did'])) {
    $panel_page->display = panels_load_display($info['did']);
    return TRUE;
  }
  return FALSE;
}