You are here

function panelizer_load_display in Panelizer 6

Same name and namespace in other branches
  1. 7 panelizer.module \panelizer_load_display()

Fetch the display associated with a panelizer object.

The display may be stored on the object, which means either that it's loaded from an export, or has been previously loaded. If not, this will attempt to load it from the database and store it on the object.

$object->display should never be accessed directly except here and other Panelizer database functions.

Parameters

$object: The panelizer object can be either a panelizer object associated with a node, or a default object. They have the same datastructure.

Return value

A panels $display object.

7 calls to panelizer_load_display()
panelizer_clone_node_panelizer in includes/node.inc
Helper function to clone a node's panelizer object and the panels display.
panelizer_default_layout_page in includes/admin.inc
Pass through to the panels layout editor.
panelizer_edit_node_layout_page in includes/node.inc
Page to edit basic settings on a panelized node.
panelizer_export_export_callback in ./panelizer.module
export.inc callback to properly export a panelizer default.
panelizer_panelizer_task_test in plugins/task_handlers/panelizer_node.inc
Determine if the panelizer task handler should fire.

... See full list

File

./panelizer.module, line 441
panelizer.module

Code

function panelizer_load_display(&$object) {
  if (empty($object->display)) {
    if (!empty($object->did)) {
      $object->display = panels_load_display($object->did);
    }
    else {
      $object->display = new panels_display();
    }
  }
  return $object->display;
}