You are here

function panels_load_display in Panels 7.3

Same name and namespace in other branches
  1. 8.3 panels.module \panels_load_display()
  2. 5.2 panels.module \panels_load_display()
  3. 6.3 panels.module \panels_load_display()
  4. 6.2 panels.module \panels_load_display()

Load a single display.

Parameters

int $did: The display id (did) of the display to be loaded.

Return value

object $display Returns a partially-loaded panels_display object. $display objects returned from this function have only the following data:

  • $display->did (the display id)
  • $display->name (the 'name' of the display, where applicable - it often isn't)
  • $display->layout (a string with the system name of the display's layout)
  • $display->panel_settings (custom layout style settings contained in an associative array; NULL if none)
  • $display->layout_settings (panel size and configuration settings for Flexible layouts; NULL if none)
  • $display->css_id (the special css_id that has been assigned to this display, if any; NULL if none)
  • $display->content (an array of pane objects, keyed by pane id (pid))
  • $display->panels (an associative array of panel regions, each an indexed array of pids in the order they appear in that region)
  • $display->cache (any relevant data from panels_simple_cache)
  • $display->args
  • $display->incoming_content

While all of these members are defined, $display->context is NEVER defined in the returned $display; it must be set using one of the ctools_context_create() functions.

Related topics

10 calls to panels_load_display()
panels_mini_export in panels_mini/panels_mini.module
Export a mini panel.
panels_mini_load in panels_mini/panels_mini.module
Load a single mini panel.
panels_node_edit_content in panels_node/panels_node.module
Pass through to the panels content editor.
panels_node_edit_layout in panels_node/panels_node.module
Pass through to the panels layout editor.
panels_node_export_node_alter in panels_node/panels_node.module
Implementation of hook_export_node_alter().

... See full list

File

./panels.module, line 1048
Core functionality for the Panels engine.

Code

function panels_load_display($did) {
  $displays = panels_load_displays(array(
    $did,
  ));
  if (!empty($displays)) {
    return array_shift($displays);
  }
}