function panels_node_add_displays in Panels 6.2
Same name and namespace in other branches
- 5.2 arguments/node_add.inc \panels_node_add_displays()
What additional displays does this argument provide?
1 string reference to 'panels_node_add_displays'
- panels_node_add_panels_arguments in arguments/
node_add.inc - @file arguments/nid.inc
File
- arguments/
node_add.inc, line 126 - arguments/nid.inc
Code
function panels_node_add_displays($conf, $id) {
$displays = array();
if (!empty($conf['own_default'])) {
$displays['default'] = array(
'title' => t('Node add 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) {
if (!empty($options[$type])) {
$displays[$type] = array(
'title' => t('Node add 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;
}