You are here

function panels_node_edit_choose_display in Panels 5.2

Same name and namespace in other branches
  1. 6.2 arguments/node_edit.inc \panels_node_edit_choose_display()

Based upon the settings and the context, choose which display to use.

1 string reference to 'panels_node_edit_choose_display'
panels_node_edit_panels_arguments in arguments/node_edit.inc
@file arguments/nid.inc

File

arguments/node_edit.inc, line 144
arguments/nid.inc

Code

function panels_node_edit_choose_display($conf, $context) {
  if (empty($context->form)) {
    return;
  }
  if (!empty($conf['displays'][$context->node_type])) {
    return $context->node_type;
  }

  // Please note that 'default' is a special display.
  if (!empty($conf['own_default'])) {
    return 'default';
  }

  // Empty return says to use the default display.
  return;
}