You are here

function panels_load_display in Panels 6.2

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. 7.3 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 instanceof panels_display \n Returns a partially-loaded panels_display object. $display objects returned from 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 panels_context_create() functions.

Related topics

10 calls to panels_load_display()
panels_mini_export in panels_mini/panels_mini.module
Export a mini panel into PHP code for use in import.
panels_mini_load in panels_mini/panels_mini.module
Load a 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_edit_layout_settings in panels_node/panels_node.module
Pass through to the panels layout settings editor.

... See full list

File

./panels.module, line 659
panels.module

Code

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