You are here

function panels_page_fetch_display in Panels 5.2

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

Load a display into the 'current display' position, $panel_page->current.

The family of panels_page_fetch*() functions are specifically dedicated to retrieving a particular display and placing them in $panels_page->display, which is the 'current' display upon which all other operations act. via reference to its permanent home in the $panels_page object. The permanent homes vary:

-# For the primary display, that location is $panels_page->primary. -# For alternate default displays, that location is in $panels_page->alternates['defaults'][$did]. TODO this isn't true right now -# For alternate non-default displays, that location is in $panels_page->alternates['all'][$did].

The structure of this function family essentially means that no other panels_page function should ever act on anything except $panel_page->display.

Parameters

object $panel_page:

string $id: A string of the format generated by panels_argument_get_display().

Return value

NULL This function has no return value, as all of its meaningful operations are performed by reference. Look to the $panel_page object for changes.

4 calls to panels_page_fetch_display()
panels_page_edit_content in panels_page/panels_page.admin.inc
Pass through to the panels content editor.
panels_page_edit_layout in panels_page/panels_page.admin.inc
Pass through to the panels layout editor.
panels_page_edit_layout_settings in panels_page/panels_page.admin.inc
Pass through to the panels layout settings editor.
panels_page_view_page in panels_page/panels_page.module
Page callback to view a panel page.

File

panels_page/panels_page.module, line 804
panels_page.module

Code

function panels_page_fetch_display(&$panel_page, $id = NULL) {

  // Redirect to the appropriate fetcher depending on whether $id is provided
  if (empty($id)) {
    panels_page_fetch_primary_display($panel_page);
  }
  else {
    panels_page_fetch_alternate_display($panel_page, $id);
  }
}