You are here

function panels_sanitize_display in Panels 5.2

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

Clean up a display and make sure it has some required information if it doesn't already exist. Currently we require a context, an incoming content and a css_id.

1 call to panels_sanitize_display()
panels_render_display in ./panels.module
Render a display by loading the content into an appropriate array and then passing through to panels_render_layout.

File

./panels.module, line 614
panels.module Core API for Panels. Provides display editing and rendering capabilities.

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;
  }
}