You are here

function panels_node_edit_displays in Panels 6.2

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

What additional displays does this argument provide?

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

File

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

Code

function panels_node_edit_displays($conf, $id) {
  $displays = array();
  if (!empty($conf['own_default'])) {
    $displays['default'] = array(
      'title' => t('Node edit form @id Default', array(
        '@id' => $id,
      )),
      'context' => 'node',
    );
  }
  if (is_array($conf['displays'])) {
    $options = array();
    foreach (node_get_types() as $type => $info) {
      $options[$type] = $info->name;
    }
    foreach (array_keys(array_filter($conf['displays'])) as $type) {
      $displays[$type] = array(
        'title' => t('Node edit form @id @type', array(
          '@id' => $id,
          '@type' => $options[$type],
        )),
        // Tell it to base the template for this display off of the default.
        'default' => 'default',
        'context' => 'node',
      );
    }
  }
  return $displays;
}