You are here

function panels_sanitize_display in Panels 6.2

Same name and namespace in other branches
  1. 5.2 panels.module \panels_sanitize_display()

Clean up a display object and add some required information, if missing.

Currently a display object needs 'args', 'incoming content', 'context' and a 'css_id'.

Parameters

&$display: The display object to be sanitized.

Return value

The sanitized display object.

Related topics

1 call to panels_sanitize_display()
_panels_render_display in includes/display-render.inc
Render a display by loading the content into an appropriate array and then passing through to panels_render_layout.

File

./panels.module, line 539
panels.module

Code

function panels_sanitize_display(&$display) {
  if (!isset($display->args)) {
    $display->args = array();
  }
  if (!isset($display->incoming_content)) {
    $display->incoming_content = NULL;
  }
  if (!isset($display->context)) {
    $display->context = array();
  }
  if (!isset($display->css_id)) {
    $display->css_id = NULL;
  }
}